”@

Home 

c# Programming Glossary: mycontext

How can I disable model compatibility checking in Entity Framework 4.3?

http://stackoverflow.com/questions/10623260/how-can-i-disable-model-compatibility-checking-in-entity-framework-4-3

How can I use Entity Framework on an object graph past a depth of 2 with MySQL Connector / NET?

http://stackoverflow.com/questions/11676513/how-can-i-use-entity-framework-on-an-object-graph-past-a-depth-of-2-with-mysql-c

get set public string Description get set public class MyContext DbContext public DbSet Harbor Harbors get set public DbSet.. args Database.SetInitializer new DropCreateDatabaseAlways MyContext using var context new MyContext context.Database.Initialize.. DropCreateDatabaseAlways MyContext using var context new MyContext context.Database.Initialize true var harbor new Harbor ..

Entity Framework/SQL2008 - How to Automatically Update LastModified fields for Entities?

http://stackoverflow.com/questions/3879011/entity-framework-sql2008-how-to-automatically-update-lastmodified-fields-for-e

the SaveChanges method on my DbContext public class MyContext DbContext public override int SaveChanges ObjectContext context..

Insert new object with existing object

http://stackoverflow.com/questions/5416323/insert-new-object-with-existing-object

I have this codeĀ± public bool Save ObjectA obj using MyContext context new MyContext context.objectAs.AddObject obj context.SaveChanges.. public bool Save ObjectA obj using MyContext context new MyContext context.objectAs.AddObject obj context.SaveChanges This code.. the objectB repository public IList ObjectB GetAll using MyContext context new MyContext IList ObjectB objects context.objectBs.ToList..

Entity Framework Multiple Object Contexts

http://stackoverflow.com/questions/5693843/entity-framework-multiple-object-contexts

off proxy creation and lazy loading use var context new MyContext context.ContextOptions.ProxyCreationEnabled false You can actually..

Unique key with EF code first

http://stackoverflow.com/questions/5701608/unique-key-with-ef-code-first

public class MyInitializer CreateDatabaseIfNotExists MyContext protected override void Seed MyContext context context.Database.ExecuteSqlCommand.. MyContext protected override void Seed MyContext context context.Database.ExecuteSqlCommand CREATE UNIQUE INDEX..

What causes .Attach() to be slow in EF4?

http://stackoverflow.com/questions/5917478/what-causes-attach-to-be-slow-in-ef4

all of type string public string P50 get set public class MyContext DbContext public DbSet MyClass MyClassSet get set ... and this.. set ... and this test program ... using var context new MyContext var list new List MyClass for int i 0 i 1000 i var m new MyClass..

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

35000 objects within one transaction using var uow new MyContext for int i 1 i 35000 i var o new MyObject ... uow.MySet.Add o..

How do I prevent decimal values from being truncated to 2 places on save using the EntityFramework 4.1 CodeFirst? [duplicate]

http://stackoverflow.com/questions/6629263/how-do-i-prevent-decimal-values-from-being-truncated-to-2-places-on-save-using-t

ef code first share improve this question public class MyContext DbContext public DbSet Metrics Metrics get set protected override..

Overriding SaveChanges and setting ModifiedDate, but how do I set ModifiedBy?

http://stackoverflow.com/questions/7641552/overriding-savechanges-and-setting-modifieddate-but-how-do-i-set-modifiedby

to pass the current user to the context public class MyContext DbContext public MyContext string userName UserName userName.. to the context public class MyContext DbContext public MyContext string userName UserName userName public string UserName get..

Do asynchronous operations in ASP.NET MVC use a thread from ThreadPool on .NET 4

http://stackoverflow.com/questions/8743067/do-asynchronous-operations-in-asp-net-mvc-use-a-thread-from-threadpool-on-net-4

FooController AsyncController EF 4.2 DbContext instance MyContext _context new MyContext public void IndexAsync AsyncManager.OutstandingOperations.Increment.. EF 4.2 DbContext instance MyContext _context new MyContext public void IndexAsync AsyncManager.OutstandingOperations.Increment..