SaveChanges() from an EntityFramework context fails silently

.net c# entity-framework entity-framework-6

Accepted Answer

ZZZ_tmp
7
7/2/2014 1:53:11 PM

Popular Answer

Have you tried bringing it in as a new Business object? rather than first constructing one?

 var fb = new Business();
 //fb.Id exists and is an int but it is auto incr in the db
 fb.Name = ub.ACCOUNT_NAME;
 fb.ServiceManager = ub.SERVICE_MANAGER;
 fb.AccountManager = ub.ACCOUNT_MANAGER;
 fb.SalesPerson = ub.SALESPERSON;
 fb.Created = DateTime.UtcNow;
 fb.Updated = DateTime.UtcNow;
 _context.Business.Add(fb);
 _context.SaveChanges();


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow