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

learn more… | top users | synonyms

2
votes
1answer
124 views

Is it good practice to put database connections into a class library? [on hold]

I am using entity framework and I created multiple libs. XYZ is main lib which handles majority of operations. And for integration purpose I have created different libs which are comparatively ...
1
vote
2answers
91 views

User and role modeling

I'm working with a system in ASP.NET MVC, with Entity Framework for ORM. The application has a requirements to allow users to have different types of roles, and authorization rules will be different ...
0
votes
1answer
20 views

Optimizing and caching frequently accessed but rarely updated Tables

My app has some tables that will be rarely updated, probably just once in the beginning and at the system setup. Despite that, they will be frequently accessed. Almost every operation depends on ...
0
votes
1answer
56 views

Class with navigation property and with or without foreign key

Let's say I have the following classes, auto generated by Entity Framework, that have an association: public class Parent() { public int ParentID { get; set; } // PK public int ChildID { ...
0
votes
2answers
65 views

how to do temporary tables in Linq to Entity Framework

Our application queries the database primarily using Linq queries backed by Entity Framework but we sometimes call legacy stored procedures. Sometimes we want to replace an existing stored procedure ...
2
votes
0answers
32 views

Updating an entity via a service layer

What's the best way to update an entity using a service layer? Performing a single, atomic action I can understand like BlogService.Publish(blogID) but what about editing multiple values which map to ...
0
votes
1answer
30 views

How can I approach application programming from a database background? [closed]

I have a lot of database experience, but virtually no application programming experience. At work, we have an EDMX? model generated from entities in the database, and we transform T4 templates to ...
1
vote
0answers
45 views

Why does the EF query plan cache eviction algorithm reduce the cache to its cleanup trigger size, causing a perpetual cleanup?

The cache eviction algorithm for query plan caching in Entity Framework is described in section 3.2.2 as this: Once the cache contains a set number of entries (800), we start a timer that ...
0
votes
1answer
130 views

Project architecture for application with dynamic database

We've a project that has some tables are defined and some will be generated runtime, means dynamic and no pre-defined structure. We generally use Entity Framework to communicate to the database(in ...
0
votes
0answers
129 views

Executing stored procedure in EntityFramework on SaveChanges()

I'm using Entity Framework (Code first, or rather code only, database first) as my DAL. Among other things it's used in WCF service that inserts some new data to database. For most cases the ...
3
votes
4answers
389 views

Why does CI stipulate that we should be able to rollback to any version of a software?

I was reading the book "Continuous delivery, reliable software deployments through build, tests and deployment automation ". And the author mentions that one should be able to rollback to any version ...
4
votes
0answers
97 views

DB migration and Azure deployment slots

I'm planning to push a new web application to an Azure Web Service (former Azure Website). I'd like to make use of the deployment slots to be able to test my deployment before pushing it to ...
1
vote
1answer
103 views

How to evaluate the performance of a Data Access Layer b/w two ORM's?

I am currently working on a project where I am going to replace the Data Access Layer from a custom ORM to Entity Framework.(The product is almost complete and mostly any changes that will follow ...
0
votes
0answers
67 views

Code First/Entity Framework and one to one tables

I am working on an application which has a table with two related one to one tables in the existing design. My research suggests that Entity Framework doesn't work well with an optional one to one ...
0
votes
0answers
156 views

Dependency Injection with EF - is mapping required?

I'm implementing the Repository pattern with using DI and EF6. I created the database (that inherits from DbContext) object with the Visual Studio wizard ADO.NET Entity Data Model I have a generic ...
2
votes
1answer
275 views

Seperating ASP.NET IdentityUser from my other entities

I have a ProjectName.Core library containing all my business logic and my entities and their behaviour. There's currently no relation whatsoever to Entity Framework or any other DAL because I like to ...
2
votes
2answers
388 views

Can I update an attached object using a detached but equal object?

I retrieve movie data from an external API. In a first phase I will scrape each movie and insert it into my own database. In a second phase I will periodically update my database by using the API's ...
5
votes
2answers
238 views

How to organize predefined queries with Entity Framework?

I have some queries that I use all the time (like get rows only of some specific type, or count something etc.). I'd like to organize them somehow (better then I currently do). Currently I have them ...
4
votes
1answer
358 views

How do you guarantee that your database context is disposed of properly when your lazy collection is no longer needed?

I'm looking for a best practices kind of answer here. Given that best practices for interacting with classes that implement IDisposable is via the Using statement - What is the best practice for ...
1
vote
0answers
78 views

Organizing Entity Framework Code First Migrations

I recently started a small test app using EF 6 Code First so that I can learn / practice using EF and databases (I'm a front end developer). As I am developing I will want to make changes the POCO ...
1
vote
1answer
188 views

Does snapshot change tracking break DDD principles?

I'm building a website with MVC 5 and Entity Framework 6, implementing the Unit of Work & Repository patterns, and - for flexibility and performance - would like to utilize Entity Framework's ...
1
vote
1answer
175 views

Stateless Web Applications Defeat DBContext Somehow?

In Entity Framework, the DBContext class is said to implement the unit-of-work pattern. As I interpret this, it means that if you make a DBContext, manipulate its data, and then dispose of it, then ...
0
votes
2answers
85 views

Updating particular properties of EF objects every X amount of days in MVC

I'm building an MVC ASP.NET IMDb-like website which presents various information about movies to users, relying on 3rd party APIs to (initially) fetch movie info. The IDs representing each movie on ...
2
votes
2answers
716 views

Database performance comparison

I have been tasked with moving from a MSSQL backed database, entity framework code-first, wcf service based MVC application to a MySQL backed database. I have had being trying to find a performance ...
1
vote
1answer
433 views

Repository pattern without entity framework?

Is it possible to implement the Repository pattern without using entity framework? I am working on a small dev team of 3 on a small scale (for now) ASP.NET MVC solution. I told my manager that I ...
1
vote
0answers
140 views

Entity Framework and separating DAL from domain entities

If I have a normalized db, it's unlikely to map 1 to 1 with my domain entities. So I customize my EF entities to fit the domain. But now my EF entities are essentially my domain entities and my DAL is ...
1
vote
3answers
415 views

Bad Practice using Auto Generated Classes for Data Access

I've seen this before but haven't found concrete reasons. When you add Entities to your EF model, EF auto generates classes for these entities. In terms of DataAccess, why is it preferred to not ...
1
vote
0answers
103 views

MVC Sites and Entity Framework (using DbContext)

I've been looking at a couple of the MVC tutorials on the ASP.NET website and and have noticed numerous of them make use of Entity Framework (especially the Identity provider stuff). Maybe my ...
2
votes
0answers
192 views

Entity Framework Lookup Tables

I am coming from working with ADO.net DataSets and feel fairly comfortable with how they work. Mainly, I usually have a DATA table with a large number of REF tables for lookups. In DataSets it was ...
2
votes
1answer
290 views

How to represent an optional-to-optional relationship in a database

I have two types of users: a CRM user and a system user. We have a record of every CRM user, thanks to a nightly sync that we run (so we don't have to hit the CRM API every time). We have system users ...
0
votes
1answer
104 views

Inverse property naming (ORM scenario) [closed]

I have a class that represents a process. In this process there are inputs boxes and output boxes. public class Process { public long ProcessId { get; set; } public virtual List<Box> ...
0
votes
1answer
585 views

Using Code First concept of Entity Framework in production

I'm developing an application and I have a database with it using Entity Framework Code First concept. I like this approach very much. I'm using the latest version of EF which is 6.1.1. My main ...
1
vote
1answer
143 views

Controller / Service - Should a service save changes to the database

I have an action on my controller called DeleteLine. This removes a line from the users basket. My controller action looks like this: [HttpGet] public ActionResult DeleteLine(int orderId, int ...
2
votes
1answer
165 views

Entity Framework Code First Centralized database deployment

I originally posted this on stack overflow but was told that here is a better place to ask this kinda stuff. I couldn't find any other similar answered question but if there is one please give me a ...
3
votes
1answer
283 views

How to store a potentially large amount of optional properties of objects?

I'm using Entity Framework Code First with ASP.NET MVC. This handles my database design based on the domain models within my application. As it stands, the engine I'm writing will have a website ...
2
votes
1answer
732 views

Should you reuse an Entity Framework EDMX between multiple solutions?

We currently have 1 giant EDMX for our corporate database. It, along with all of the generated POCOs, are in a separate project (we'll call it the EDMX project) which we pull in to any solution that ...
0
votes
0answers
248 views

Row and Field level Security Management through Code First EF, WebApi2

I could not find such question specific to asp.net webapi row level security on SO. I am building an API through .NET Webapi2 with Entity Framework. I am trying to assess various options that are ...
10
votes
2answers
7k views

Should an ASP.NET MVC application directly use Entity Framework as the model?

I'm building my first MVC application in Visual Studio 2013 (MVC 5) and I'm a bit unclear on the best way to setup my model. I've generated an entity framework model using code-first from an existing ...
2
votes
2answers
175 views

How do I write my BLL to make it re-usable?

Most of it was written 4-5 years ago. Our teams long term objectives are to use Entity Framework. Though we aren't gonna do it right away as our deadlines aren't allowing us to do so. Now we have our ...
0
votes
2answers
333 views

Is a mocking framework useful if I'm unit testing a repository/database? [duplicate]

I'm trying to improve my testing skills. I frequently hear about mocking framework to build fake objects (as far as I understand). Right now I need to test my repository (the usual add, remove, update ...
1
vote
0answers
107 views

Proper Architecture for DBContext and Migrations with Multiple Projects

I have multiple projects that will be using the same business objects (customer, order) but the projects operate in different databases within the organization and I would like to understand the ...
4
votes
1answer
1k views

Repository Pattern: Exposing Data Context to Underlying Layers

My team is in the process of updating a legacy project. We've decided to incorporate the Repository Pattern along with Entity Framework in our Data Access layer. Below is a high-level view of this ...
3
votes
5answers
520 views

Is DDD not appropriate for my website or should I introduce a Query Layer?

I have inherited an ASP.NET website application and the previous developer has used what I believe are some DDD concepts. I am new to DDD and I have to admit I am struggling with the practical side of ...
2
votes
1answer
2k views

What are the benefits of using entity framework code-first instead of designing my database using SQL?

I'm currently working on designing a small web application (MVC5) and I'm to the point of designing my database. I have the schema I want worked out and I am quite proficient in SQL Server. (I have my ...
2
votes
2answers
197 views

Communication/Updates between units of works/entity framework contexts, colliding with user changes

I'm developing a WPF application using Entity Framework for my database communication. The application has a hierarchy of tabs where each tab has a db context. Each tab allows the user to view some ...
2
votes
2answers
4k views

How to model users accounts in ASP MVC Framework with Entity Framework using code-first approach?

How do you design your code-first approach in entity framework when your code should include user data (name, password...) without repeating/overwriting what the MVC framework will generate in terms ...
2
votes
1answer
180 views

Using json as database with EF, how can I link EF and the json file during DbContext initialization?

For a personal testing-project I am considering to create a SPA with the following technologies: ASP.NET MVC + EF + WebAPI + AngularJS. The project will make use of small amount of data, so I was ...
2
votes
0answers
163 views

What strategy to follow while matching sql server datatypes in C# Code First approach while using Entity Framework

While matching SQL Server datatypes with C# Code First Approach in Entity Framework, what are specific points that we should keep in mind so that our C# datatype should match exactly our SQL Server ...
1
vote
1answer
210 views

Is table inheritance the wrong approach

If we take the two below entities as en example. public class Person { public string Username {get;set;} public string DisplayName {get;set;} } public class Worker:Person { public string ...
4
votes
2answers
429 views

Entity Framework with no direct table access

There are some similar questions I've found here, but none of them fully answer the question I'm asking. Similar questions: here and here In my company, I develop C# .NET applications and our Server ...