An ORM built by Microsoft and is available as part of .Net framework 3.5 and later.
0
votes
1answer
31 views
Entity Framework Code First, C# class separation and EAV
I'm in the process of redesigning a portion of my ASP.NET MVC application. I'm currently using Entity Framework 6.1 code first approach.
I've been reading as of late that (Correct me if I'm wrong, I ...
4
votes
2answers
140 views
Are Repositories needed any longer in ASP.net 5 & EF7?
I posted a question on github to the EF Team. I got a reply saying it would be better to ask this question here so I will copy and paste it here as we as a link so other can see the few replies on ...
2
votes
1answer
64 views
Proper MVC5 Layered Implementation
I am fairly new to MVC5 Development and I have been doing a lot of reading about Layered Design, DI, IoC, etc... I feel that I am getting a grasp of concepts, however when it comes down to writing a ...
4
votes
4answers
188 views
If Repository Pattern is overkill for modern ORMs (EF, nHibernate), what is a better abstraction?
I've recently read a lot of arguments against using the repository pattern with powerful ORM's like Entity Framework as it incorporates repository-like functionality, along with Unit of Work ...
0
votes
0answers
32 views
Should I reference both up and down a hierarchy when using Entity Framework?
Let's say I'm modelling an organizational hierarchy which consists of Divisions that contain Departments that contain Teams. So Division -> Department -> Team.
While it makes sense for the Division ...
1
vote
0answers
104 views
How to manage dbContext in a multi-user application?
I put together my first line-of-business app using WPF/MVVM/EF6(db-first)/MSSQL and realised that multiple users could not see each others' changes because I was using one dbcontext and keeping it ...
0
votes
0answers
19 views
Composite ViewModels from many Domain models
I asked a similar question on this site before but from then on things got a little more complicated. I'm trying to find the best way to implement ViewModels which are regularly composed from ...
0
votes
1answer
84 views
Data Structure for Form or Survey [closed]
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
124 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
275 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
210 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
288 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
67 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
108 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
327 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
492 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
66 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
86 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
214 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
114 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
296 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
643 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
507 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
133 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
457 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
297 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
116 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
611 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
1k 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
83 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
43 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
110 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
418 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
804 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
477 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 ...
9
votes
0answers
415 views
DB migration and Azure deployment slots
I'm planning to push a new web application to an Azure Web App 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
125 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
191 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 ...
3
votes
2answers
2k 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 ...
6
votes
2answers
487 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
605 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
157 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
331 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
380 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
203 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
222 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
889 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
142 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 ...