Dependency injection with n-tier Entity Framework solution
I am currently designing an n-tier solution which is using Entity Framework 5 (.net 4) as its data access strategy, but am concerned about how to incorporate dependency injection to make it testable / flexible.
Is There a Real Advantage to Generic Repository?
Was reading through some articles on the advantages of creating Generic Repositories for a new app (example). The idea seems nice because it lets me use the same repository to do several things for several different entity types at once:
Entity Framework with large systems – how to divide models?
I’m working with a SQL Server database with 1000+ tables, another few hundred views, and several thousand stored procedures. We are looking to start using Entity Framework for our newer projects, and we are working on our strategy for doing so. The thing I’m hung up on is how best to split the tables into different models (EDMX or DbContext if we go code first). I can think of a few strategies right off the bat:
How far should an entity take care of its properties values by itself?
Let’s consider the following example of a class, which is an entity that I’m using through Entity Framework.
How should I implement the repository pattern for complex object models?
Our data model has almost 200 classes that can be separated out into about a dozen functional areas. It would have been nice to use domains, but the separation isn’t that clean and we can’t change it.
Are elements returned by Linq-to-Entities query streamed from the DB one at the time or are they retrieved all at once?
Are elements returned by Linq-to-Entities query streamed from the database one at the time ( as they are requested ) or are they retrieved all at once:
WCF an Entity Framework connection
I have a 100+ users on a Silverlight application that uses WCF and entity framework.
Nesting Linq-to-Objects query within Linq-to-Entities query –what is happening under the covers?
var numbers = new int[] { 1, 2, 3, 4, 5 }; var contacts = from c in context.Contacts where c.ContactID == numbers.Max() | c.ContactID == numbers.FirstOrDefault() select c; foreach (var item in contacts) Console.WriteLine(item.ContactID); Linq-to-Entities query is first translated into Linq expression tree, which is then converted by Object Services into command tree. And […]
Architecture : am I doing things right?
I’m trying to use a ‘~classic’ layered arch using .NET and Entity Framework. We are starting from a legacy database which is a little bit crappy:
Where to put custom validation while using Entity Framework
I am using MVC3 and Enitty Framework 4 with the Database first approach. It created the context template with its own validation for the fields based on the database. My question is where should I put the other validation based on the buisness logic. Should I put it in the Context.tt file, should it go in the controller or should it go in a seperate model?