¡@

Home 

c# Programming Glossary: dbcontext

Soft Delete Entity Framework Code First

http://stackoverflow.com/questions/12698793/soft-delete-entity-framework-code-first

Entity Framework Code First I overrode SaveChanges in DbContext to allow me to do a soft delete if item.State EntityState.Deleted..

Is DbContext the same as DataContext?

http://stackoverflow.com/questions/3471455/is-dbcontext-the-same-as-datacontext

DbContext the same as DataContext I'm following a tutorial by Scott Gu.. a tutorial by Scott Gu that refers to a class named DbContext. I can't find it on any namespace on framework 4 and it seems.. on framework 4 and it seems to me it was renamed from CT4 DbContext to .net4 System.Data.Linq.DataContext. Is my assumption correct..

Entity Framework Code First: decimal precision and scale

http://stackoverflow.com/questions/3504660/entity-framework-code-first-decimal-precision-and-scale

as shown but the can just be called from public class EFDbContext DbContext protected override void OnModelCreating System.Data.Entity.DbModelBuilder.. but the can just be called from public class EFDbContext DbContext protected override void OnModelCreating System.Data.Entity.DbModelBuilder..

Entity Framework Code Only error: the model backing the context has changed since the database was created

http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc

I can change. I merely created the POCO defined a simple DbContext made a few tweaks and then tried to run a simple query. Since..

EF4 Code First: how to add a relationship without adding a navigation property

http://stackoverflow.com/questions/5217441/ef4-code-first-how-to-add-a-relationship-without-adding-a-navigation-property

get set public Role Role get set public class TestContext DbContext public TestContext base Entities protected override void OnModelCreating..

Does Entity Framework 4 Code First have support for identity generators like NHibernate?

http://stackoverflow.com/questions/5275306/does-entity-framework-4-code-first-have-support-for-identity-generators-like-nhi

generator you will have to override SaveChanges in derived DbContext and implement your own logic of assigning Ids to new entities... Edit Some high level example public class Context DbContext Helper for example DO NOT USE IN REAL SCENARIOS private static..

Why is inserting entities in EF 4.1 so slow compared to ObjectContext?

http://stackoverflow.com/questions/5943394/why-is-inserting-entities-in-ef-4-1-so-slow-compared-to-objectcontext

false This change detection is enabled by default in the DbContext API. The reason why DbContext behaves so different to the ObjectContext.. is enabled by default in the DbContext API. The reason why DbContext behaves so different to the ObjectContext API is that many more.. the ObjectContext API is that many more functions of the DbContext API will call DetectChanges internally than functions of the..

EXECUTE AS when using a DbContext with Linq

http://stackoverflow.com/questions/11602409/execute-as-when-using-a-dbcontext-with-linq

best way to do so c# linq entity framework multi tenant dbcontext share improve this question Have you tried myDbContext.Submit..

EntitySet System.InvalidOperationException - “the entity type is not part of the model for the current context”

http://stackoverflow.com/questions/13634819/entityset-system-invalidoperationexception-the-entity-type-is-not-part-of-the

entities and has no associations... c# entity framework dbcontext ef model first csdl share improve this question You need..

EF4 Code First: how to add a relationship without adding a navigation property

http://stackoverflow.com/questions/5217441/ef4-code-first-how-to-add-a-relationship-without-adding-a-navigation-property

various combinations in the OnModelCreating method of the dbcontext but to no avail. Any help is much appreciated Thanks Mel c#..

Entity Framework 4.1 - EFTracingProvider

http://stackoverflow.com/questions/5788309/entity-framework-4-1-eftracingprovider

EF 4.1 EFTracing seems to need an objectcontext and I use dbcontext. Thanks in advance c# entity framework 4.1 ef code first ..

Entity Framework and DbContext - Object Tracking

http://stackoverflow.com/questions/7099134/entity-framework-and-dbcontext-object-tracking

scenario I'm confused about. I use a linq query from the dbcontext to get data. Something like List Transactions transactions DefaultContext.Transactions.ToList..

C# LINQ to SQL: Refactoring this Generic GetByID method

http://stackoverflow.com/questions/735140/c-sharp-linq-to-sql-refactoring-this-generic-getbyid-method

I wrote the following method. public T GetByID int id var dbcontext DB var table dbcontext.GetTable T return table.ToList .SingleOrDefault.. method. public T GetByID int id var dbcontext DB var table dbcontext.GetTable T return table.ToList .SingleOrDefault e Convert.ToInt16.. T where T class IHasID new public T GetByID int id var dbcontext DB var table dbcontext.GetTable T return table.SingleOrDefault..

Entity Framework 4.2 : Getting proper database errors

http://stackoverflow.com/questions/8645233/entity-framework-4-2-getting-proper-database-errors

c# sql server entity framework exception handling dbcontext share improve this question You could do something like..

Entity Framework DbContext SaveChanges() OriginalValue Incorrect

http://stackoverflow.com/questions/9588352/entity-framework-dbcontext-savechanges-originalvalue-incorrect

2011 07 20 using entity framework 4 1 dbcontext change tracking for audit logging Entity Framework 4.1 DbContext..

Entity Framework - Generating Classes

http://stackoverflow.com/questions/10126871/entity-framework-generating-classes

querying and persisting data 3 Read Write Data example var dbContext new YourModelClass class derived from DbContext var contacts.. class derived from DbContext var contacts from c in dbContext.Contacts select c read data contacts.FirstOrDefault .FirstName.. data contacts.FirstOrDefault .FirstName Alex edit data dbContext.SaveChanges save data to DB Don't forget that you need 4.x version..

Update existing EntityCollection in Entity Framework

http://stackoverflow.com/questions/4029493/update-existing-entitycollection-in-entity-framework

.ConnectionString using CalendarContainer dbContext new CalendarContainer connString ExpertEntity expert from e.. connString ExpertEntity expert from e in dbContext.ExpertEntities where e.ExpertIdentifier args.Expert.ExpertIdentifier.. if expert null args.Expert.ExpertIdentifier Guid.NewGuid dbContext.AddToExpertEntities args.Expert else dbContext.ExpertEntities.ApplyCurrentValues..

Generic Way to Check If Entity Exists In Entity Framework?

http://stackoverflow.com/questions/6018711/generic-way-to-check-if-entity-exists-in-entity-framework

like that should work var objContext IObjectContextAdapter dbContext .ObjectContext var objSet objContext.CreateObjectSet T var keyNames..

what is the most reasonable way to find out if entity is attached to dbContext or not?

http://stackoverflow.com/questions/6033390/what-is-the-most-reasonable-way-to-find-out-if-entity-is-attached-to-dbcontext-o

most reasonable way to find out if entity is attached to dbContext or not when i try to attach entity to context i get an exception..

Entity Framework v4.1 LIKE

http://stackoverflow.com/questions/6202036/entity-framework-v4-1-like

LIKE 'a b c ' ObjectContext ctx IObjectContextAdapter dbContext .ObjectContext ObjectQuery EntityType query new ObjectQuery..

Entity Framework and DbContext - Object Tracking

http://stackoverflow.com/questions/7099134/entity-framework-and-dbcontext-object-tracking

can do ObjectContext objectContext IObjectContextAdapter dbContext .ObjectContext ObjectSet Transactions set objectContext.CreateObjectSet..

How to ignore a table/class in EF 4.3 migrations

http://stackoverflow.com/questions/9016709/how-to-ignore-a-table-class-in-ef-4-3-migrations

class from model. finally i can't use it for access via dbContext. i like to use automatic migrations. i try to avoid to migrate..