An ORM built by Microsoft and is available as part of .Net framework 3.5 and later.

learn more… | top users | synonyms

0
votes
2answers
291 views

How do I read the Entity Framework Model and validate it against a given connection?

I have a Entity Framework Database First Model. I want to write a MSTest/nUnit test to verify that all the stored procs, tables and views that are defined in my edmx model are still valid on the ...
1
vote
1answer
321 views

How do I architect zip code & distance calculation functionality?

I am building an app using MVC 4/Razor and EF 4/ .NET 4 in which it is possible to search items by zip code and thus retrieving items only a certain distance from your current zip code. I have a class ...
0
votes
1answer
137 views

Inheritance with Entity Framework Code First

I'm starting work on a new personal project and I'm looking to get advice in regards to setting up my classes. My base class is a User. The User class will have the following general properties ...
1
vote
2answers
135 views

Should db be mapped directly to the UI or should there be multiple layers of enties/models with mappings to/from each?

I would like to know arguments for/against this concept. Technologies in use from the bottom up: MSSQL 2012 DB (exclusively accessed via sprocs) Entity Framework WCF Web Service ASP.NET Webforms ...
1
vote
2answers
544 views

What is right choice of Data Access Layer for large application

I am using Singleton pattern for my application, I have used ADO.NET Entity framework as my Data Access Layer, after login to my application, it's taking 3 to 5 minutes to load the dashboard. Is ...
1
vote
1answer
3k views

DbFirst vs Code First? what should I use if I rely on Stored procedures

This question is asked many times, and I always prefer code-first as I like to keep the logic in code. But now I have a challenge to load screen under 5 seconds and very little time to do things. I ...
9
votes
3answers
2k views

Entity Framework Entities - Some Data From Web Service - Best Architecture?

We are currently using Entity Framework as an ORM across a few web applications, and until now, it has suited us well as all our data is stored in a single database. We are using the repository ...
0
votes
1answer
177 views

Are there any concerns with using a static read-only unit of work so that it behaves like a cache?

Related question: How do I cache data that rarely changes? I'm making an ASP.NET MVC4 application. On every request the security details about the user will need to be checked with the ...
2
votes
3answers
2k views

How do I cache data that rarely changes?

In my ASP.NET application there is some data that doesn't change often and so there is no point in querying the database to re-check it every time. In my current situation I am checking user ...
1
vote
1answer
519 views

Entity framework and Eager loading and enterprise application with DDD aproach

We are trying to create an ASP.NET MVC 4 application using entity framework with domain driven development style pattern approach. As you can see in our part of domain layer, we have a complex design. ...
0
votes
0answers
194 views

Entity framework separating entities for product and customer specific implementation

I am designing an application with intention into making it a product line. I would like to extend the functionality across all layers and first struggle is with domain models. For example, core ...
1
vote
2answers
2k views

Design pattern for an ASP.NET project using Entity Framework

I'm building a website in ASP.NET (Web Forms) on top of an engine with business rules (which basically resides in a separate DLL), connected to a database mapped with Entity Framework (in a 3rd, ...
0
votes
1answer
5k views

Entity Framework 5, separating business logic from model - Repository?

I am working on my first public-facing web application and I’m using MVC 4 for the presentation layer and EF 5 for the DAL. The database structure is locked, and there are moderate differences ...
4
votes
3answers
336 views

Architecting multi-model multi-DB ASP.NET MVC solution

I have an ASP.NET MVC 4 solution that I'm putting together, leveraging IoC and the repository pattern using Entity Framework 5. I have a new requirement to be able to pull data from a second database ...
8
votes
3answers
10k views

What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF?

As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement ...
1
vote
2answers
547 views

Entity Framework and distributed Systems

I need some help or maybe only a hint for the right direction. I've got a system that is separated into two applications. An existing VB.NET desktop client using Entity Framework 5 with code first ...
3
votes
2answers
260 views

Entity Framework and distributed Systems

I need some help or maybe only a hint for the right direction. I've got a system that is sperated into two applications. An existing VB.NET desktop client using Entity Framework 5 with code first ...
4
votes
2answers
560 views

Domain Logic in Service Layer exposed as WCF service

I am designing an enterprise solution which consists of modularized products within a product range using Entity Framework code first to define the domain model and provide the data access. e.g. ...
1
vote
1answer
182 views

Is it feasible to change model relationship mappings and properties in Entity Framework CodeFirst at runtime?

Here's the situation. I have an enterprise application that uses EF Codefirst to map POCOs to an existing database. This has been working fine so far. In fact I would say that it's been working really ...
0
votes
2answers
1k views

Entity Framework designer not effective anymore

At my current workplace, Entity Framework 5 is used for all data access/manipulation. It is a database-first approach using the model designer to add/edit/delete/update entities. Problem We now ...
3
votes
2answers
775 views

Sql Server Data Tools & Entity Framework - is there any synergy here?

Coming out of a project using Linq2Sql, I suspect that the next (bigger) one might push me into the arms of Entity Framework. I've done some reading-up on the subject, but what I haven't managed to ...
7
votes
3answers
1k views

Architecturally speaking, does a database abstraction layer, such as Microsoft's Entity Framework, void the need for a separate Data Access Layer?

The way it was For years, I have organized my software solutions as such: Data Access Layer (DAL) to abstract the business of accessing data Business Logic Layer (BLL) to apply business rules to ...
0
votes
2answers
565 views

How I could update a DB table using a POCO class bound in a DataGridView

I try to explain better using an example: I create the class Product with attibutes like that: private string _ProductCode = ""; [DisplayName("ProductCode")] public String ProductCode { get { ...
3
votes
2answers
649 views

Encapsulation in Domain Driven Design models?

I am using EF Code First and I had a model like below. public class Account { [Required] public string AccountNo { get; set; } [Required] public decimal Balance { get; set; } } I ...
4
votes
1answer
413 views

Does having more classes necessarily increase the memory requirements of the app?

When we add .edmx files to a DLL, the physical size of the DLL increases. DLL's are loaded into memory. However, the .NET infrastructure with functionality such as JIT compilation and the GAC ...
1
vote
4answers
1k views

Is Moving Entity Framework objects over a webservice really the best way?

I've inherited a .NET project that has close to 2 thousand clients out in the field that need to push data periodically up to a central repository. The clients wake up and attempt to push the data up ...
2
votes
4answers
665 views

ado.net or EF for a point-of-sale system

We have a point-of-sale system that was developed using ado.net, our current concern is to make the application real fast in creating transactions (sales). Usually there are no performance concerns ...
2
votes
3answers
697 views

what's a good approach to working with multiple databases?

I'm working on a project that has its own database call it InternalDb, but also it queries two other databases, call them ExternalDb1 and ExternalDb2. Both ExternalDb1 and ExternalDb2 are actually ...
6
votes
1answer
2k views

Is Code First with Migrations or SQL Server Data Tools a better fit?

I have been given a spec to create a new MVC4 website, it will not be too large a project at first but I suspect it will grow as the business gets new ideas for it. Using .NET 4.5 ASP.NET MVC4 and EF ...
1
vote
0answers
266 views

What is the rule on passing around collections? List vs. Ienumerable vs. IQueryable

I do Entity Framework stuff using repository patterns that are passed to the controller to than be called by the client using jquery AJAX.. Is there any basic rules on in what format I should be ...
2
votes
1answer
350 views

Is there value in learning Entity framework 4.0

I purchased a used book by Julia Lerman (2010) on EF4.0, and now I am wondering if the EF has changed dramatically since, I'm looking to learn this technology and i do not know if starting with a ...
1
vote
3answers
749 views

Is Entity Framework only for Asp .NET / Asp. NET MVC? [closed]

I never coded on VS and I'm a junior programmer in C# and I would like to know if the entity framework is available only for ASP .NET applications ?
1
vote
1answer
868 views

How do I split out a service layer

I currently have four projects in my website's solution: Project.Data This holds the EntityFramework DbContext object and also the Repositories that interact with it. It references Project.Models. ...
12
votes
3answers
11k views

Why should I use List<T> over IEnumerable<T>?

In my ASP.net MVC4 web application I use IEnumerables, trying to follow the mantra to program to the interface, not the implementation. Return IEnumerable(Of Student) vs Return New List(Of ...
3
votes
2answers
1k views

Is there a better way to model a many-to-many relationship on the same table with Entity Framework?

The context We're building a web application using Entity Framework 5.0. One of the requirements is that it should be possible for the administrators to link related products so that when someone ...
0
votes
2answers
419 views

Mapping a legacy database to ORM using wrapper classes

I want to use an ORM with a legacy database, but I don't want to expose some of the underlying data types. For example, some of the columns are nullable doubles or floats and I want my domain model to ...
1
vote
2answers
496 views

What is the equivalent of Entity Framework in the world of Oracle shops? [closed]

Within the world of developers/firms specializing in building/deploying solutions built around software built/sold by Oracle (aka "Oracle houses"), what ORM middleware is considered as the "industry ...
2
votes
0answers
291 views

Entity Framework design help [closed]

I'm after some advice as to whether I'm on the right track with what I'm doing. I'm developing a WPF app where I need to retrieve a large graph of entities, work on that graph in the UI (display, ...
23
votes
7answers
5k views

Should Repositories return IQueryable?

I have been seeing a lot of projects that have repositories that return instances of IQueryable. This allows additional filters and sorting can be performed on the IQueryable by other code, which ...
3
votes
1answer
349 views

Entity Framework eager loading/reference data

I'm struggling to get my head around how best to eager load entities, and how to assign relationships when creating new entities. I'm using EF5 POCO, by the way. I'm retreiving a large hierarchy of ...
1
vote
2answers
2k views

ASP.NET MVC 4 with Entity Framework 5 and SimpleMembership integrated into Repository and Unit Of Work pattern

I have a ASP.NET MVC4 project in which I would like to use the SimpleMembership. The application has a Person table that holds relevant information about users in the system. I would like a link ...
2
votes
1answer
361 views

Is it okay to convert dataset from stored procedure to IEnumerable

So, I am working on a project with a team and we are using Entity Framework. We basically want to use linq to entities, and not use stored procedures. I use quite a bit of lists and IEnumerables and ...
5
votes
1answer
428 views

Entity Framework as a type checking/verification system for database code

When I read pro and con lists of using Entity Framework (or any modern ORM really), I'm surprised that the following point doesn't arise (self quote): Using strongly-typed domain entities allows ...
1
vote
1answer
4k views

Layered architecture using Entity Framework with different class libraries

Our business requirements required to create a layered and modular architecture. So I designed an architecture to make it as decoupled and as modular as possible. I will list my layers below ASP ...
3
votes
2answers
3k views

Is it better to create a stored procedure or entities to get to the data I need?

I just jumped into a new project with a new company using Entity Framework and ASP.NET MVC 4. I am no expert on Entity Framework, but I think I have a decent grasp of how to use it. From what I can ...
13
votes
4answers
4k views

Is a Unique ID column needed in a many-to-many (junction) table?

Getting a few projects started with EF, but I had some questions about join tables and keys etc. Lets say I have a table of applications and a table of permissions. Applications have many permissions ...
3
votes
2answers
2k views

Different database for Membership and our web data or use just one?

Is better to keep our Membership stuff on the DefaultConnection and create another connection (another database) for our data? Or just one database for all? If I have a MyAppContext and I want ...
3
votes
1answer
655 views

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 ...
6
votes
1answer
747 views

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: Inconsistent naming Unneeded views (view referencing ...
2
votes
1answer
3k views

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() ...