Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
QuestionData Adapter is failing to load bulk data Pin
venky_CodeProject11-Nov-18 17:11
venky_CodeProject11-Nov-18 17:11 
AnswerRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak11-Nov-18 17:56
mveDave Kreskowiak11-Nov-18 17:56 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject11-Nov-18 19:26
venky_CodeProject11-Nov-18 19:26 
GeneralRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak12-Nov-18 13:47
mveDave Kreskowiak12-Nov-18 13:47 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject13-Nov-18 3:49
venky_CodeProject13-Nov-18 3:49 
GeneralRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak21-Nov-18 11:15
mveDave Kreskowiak21-Nov-18 11:15 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject22-Nov-18 18:57
venky_CodeProject22-Nov-18 18:57 
QuestionUsing MongoDB in a C# WinForm app with a repository Pin
jkirkerx10-Nov-18 12:43
professionaljkirkerx10-Nov-18 12:43 
I decided to port one of my vb apps over to c#, so far so good. I decided to give MongoDB a try and load the MongoDB.Bson, MongoDB.Driver, MongoDB.Driver.Core and MongoDB.Respository.Crud packages from Nuget. I went the repository route like I did in my Angular6 wrapped in .Net Core 2.2 App, but didn't think it through all the way, or it's sort of a test run with it.

It just occurred to me that on my repository DBContext configuration, that it uses the appSettings.json file and Microsoft.Extensions.Options to read the MongoDB values. I did some research and found that extension is tied to .Net Core 2. Well I guess I just answered my own question of how to find a workaround for it. This should work, just need to figure out where to initialize it, like in main form loading.

I was going to try that C# Mongo Driver but it hasn't been updated since 2010.
Is anybody else using MongoDB 4.0 in VS2017 c# Win Form, And have any experience with it?

I would to take .Net Core 3 for a test run on this project. It just makes sense to me since I have written lots of .Net Core 2 code already that I can reuse.

In my Angular .Net Core 2 App
public class CRMRepository : ICRMRepository
    {
        private readonly MongoDBContext _context = null;
        public CRMRepository(IOptions<Settings> settings)
        {
            _context = new MongoDBContext(settings);
        }        

Proposed Thought
public class MongoDB {
  public string Connection { get;set; }
  public string Database { get; set; }
}

public class CRMRepository : ICRMRepository
    {
        private readonly MongoDBContext _context = null;
        public CRMRepository(MongoDB _mongoDB)
        {
            _context = new MongoDBContext(_mongoDB);
        }  
If it ain't broke don't fix it
Discover my world at jkirkerx.com

QuestionFormatting a number and digits of precision Pin
csharpsucks6-Nov-18 12:19
csharpsucks6-Nov-18 12:19 
AnswerRe: Formatting a number and digits of precision Pin
Mycroft Holmes6-Nov-18 13:28
professionalMycroft Holmes6-Nov-18 13:28 
AnswerRe: Formatting a number and digits of precision Pin
OriginalGriff6-Nov-18 21:01
mveOriginalGriff6-Nov-18 21:01 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 4:32
csharpsucks7-Nov-18 4:32 
GeneralRe: Formatting a number and digits of precision Pin
Richard Deeming7-Nov-18 4:38
mveRichard Deeming7-Nov-18 4:38 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 4:44
mveOriginalGriff7-Nov-18 4:44 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:08
csharpsucks7-Nov-18 6:08 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 6:28
mveOriginalGriff7-Nov-18 6:28 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:44
csharpsucks7-Nov-18 6:44 
QuestionProblem at inserting a DB entry Pin
User 136751145-Nov-18 23:49
User 136751145-Nov-18 23:49 
AnswerRe: Problem at inserting a DB entry Pin
OriginalGriff6-Nov-18 0:08
mveOriginalGriff6-Nov-18 0:08 
GeneralRe: Problem at inserting a DB entry Pin
User 136751146-Nov-18 3:12
User 136751146-Nov-18 3:12 
GeneralRe: Problem at inserting a DB entry Pin
Luc Pattyn6-Nov-18 3:51
sitebuilderLuc Pattyn6-Nov-18 3:51 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn6-Nov-18 18:12
professionaltranthanhtu.vn6-Nov-18 18:12 
RantRe: Problem at inserting a DB entry Pin
Richard Deeming7-Nov-18 0:59
mveRichard Deeming7-Nov-18 0:59 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn7-Nov-18 1:27
professionaltranthanhtu.vn7-Nov-18 1:27 
RantRe: Problem at inserting a DB entry Pin
Richard Deeming7-Nov-18 1:32
mveRichard Deeming7-Nov-18 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.