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

learn more… | top users | synonyms

1
vote
1answer
38 views

Data Structure for Form or Survey

I am planning an app which allows users to complete surveys/forms. I'm having trouble planning the data schema for the forms. I really want to have a data structure which can be mostly automatically ...
0
votes
0answers
105 views

Is this approach scalable?

I am working to rewrite a legacy application (C++) to C# ASP.NET MVC with EF6 but plan to upgrade to ASP.NET Core1 and EF Core 1. The database schema is really arcane in that it has a single schema ...
3
votes
1answer
95 views

Mapping Domain models to ViewModel

I have an Asp.net MVC5 application structured like this: Core Domain project Infrastructure DAL project Utilities UI UI project (contains ViewModel at the moment, will probably put that ...
0
votes
1answer
52 views

How to map entity class (ClassA) in two different table (Table1 and Table2) in Entity Framework Code First? [closed]

Here's the situation. I have two table (Table 1 and Table 2) with the same entities and a class(ClassA) which was mapped to Table 1 but in some scenario I have to transfer the specific data from Table ...
5
votes
3answers
187 views

Entity Framework in n-tier application confusion

I'm building a rather large (web) application where I'm using Entity Framework to communicate with the database. My solution is set up in layers like so: Client Website (MVC web application) ...
3
votes
1answer
64 views

Two tables with similar structure and referential integrity or one table

Overview My question revolves around balancing database and code simplicity using 2 options to design around the following requirement. Background Facts The DB: Sql Server The Code: ASP.NET MVC ...
0
votes
0answers
77 views

Enforce No Multiple Async Entity Framework Operations

We are working on a large-ish MVC web application with multiple backing stores including a SQL Server database accessed via Entity Framework 6.0. We are using asynchronous operations wherever we can, ...
2
votes
2answers
299 views

How to see Entity Framework code with ASP.NET MVC from a software architecture viewpoint?

Let's say I'm starting a Web Application project that uses a) ASP.NET MVC b) Entity Framework In terms of Software ARchitecture, correct me if I'm wrong, -1) Could I place all my Entity Framework ...
1
vote
1answer
353 views

C# DbContext with nested classes containing the Repository methods

So I have done a lot of reading and it appears that, since DbContext already implements a repository and unit of work pattern combination, creating more abstraction classes would be redundant. ...
0
votes
0answers
63 views

Best Practice for relating an Azure Active Directory user with Entity Framework

I'm creating an ASP.NET application that uses Azure Active Directory to Authenticate users. When using Entity Framework for the models what would be the best way to have an entity related to a ...
1
vote
2answers
81 views

Using Entity Framework, non-MVC project, need help with class structure

I'm working on a very large non-MVC project utilizing Entity Framework for database access. This is a new project, so we've got a wide-open canvas for development. The conceptual problem I'm running ...
2
votes
1answer
181 views

Class structure for Entity Framework

I'm using EF (Code first) and I'd like to isolate the properties from the methods (many of the methods reference other libraries that I don't want my database project to have to reference). As an ...
0
votes
0answers
100 views

EF “Code First” and Object/Relational Impedance

I'm trying to learn more about the current orthodoxy with respect to ASP.NET MVC application design, and I stumbled upon something that confuses me, relating to the choice among database design ...
0
votes
1answer
246 views

Entity Framework 6 and Stored Procedures

I'm new to Entity Framework, and currently developing an MVC 5 application with Code-First Entity Framework 6.1.2. I need to write custom reports. Instead of writing complex linq, I can write a ...
4
votes
2answers
508 views

Entity Framework Domain Object as Business Object

If I am not concerned with unit testing and switching my data access out at a later time, would using my entity framework objects as my business objects be okay? I have an existing database for which ...
1
vote
0answers
371 views

Any “Gotchas” to using Entity Framework for Identity & Dapper for all other DB access in a .NET MVC application?

I'm firing up an MVC project in which I'd really like to use Dapper as my ORM, as I like to be as close to the database as possible for performance and SQL tweaking reasons, yet still have the power ...
1
vote
1answer
114 views

How to model a time-based m-to-n relationship in Entity Framework using code first

I have to model and manage a time-based configuration. Typically - without an OR mapper - I would start with the database tables. Screen Color ColorScreenMapping ------------- ...
2
votes
1answer
398 views

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

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
261 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
96 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
394 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
905 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 ...
3
votes
0answers
66 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
42 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
96 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
363 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
596 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
450 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 ...
7
votes
0answers
290 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
123 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
151 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
187 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 ...
4
votes
1answer
2k views

Separating 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
1k 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
432 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
535 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
135 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
305 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
327 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 ...
2
votes
3answers
181 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
1answer
2k 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
205 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
773 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 ...
2
votes
0answers
135 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
1answer
405 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
592 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
131 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> ...
1
vote
1answer
989 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
198 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
226 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 ...