An ORM built by Microsoft and is available as part of .Net framework 3.5 and later.
1
vote
3answers
104 views
Is it OK to create and drop databases during unit tests
I am working with EntityFramework 6 code first approach and SQL Server 2014 Express. However, the DBMS may change in future.
That setup allows easily to create a database and add some dummy data for ...
0
votes
0answers
48 views
Architecture: How to pass models between controllers, services and repositories
I'm trying to build an architecture where I have a Domain project with all my domain models, an Infrastructure project with my Services and Infrastructure.Entity with my Repositories and entities.
...
1
vote
1answer
23 views
ASP.NET MVC models, EntityFramework and Automapper
It happens so that the best practice of using EntityFramework includes taking advantage of the IQueryable inside using block, like:
using (var ctx = new SomeDbContext())
{
...(do something with ctx)...
0
votes
0answers
58 views
Unit of Work / Repository patterns with EF & RESTful service
I am looking for best practices around the Unit of Work & Repository patterns. Our team is building a web app that for the first phase will be interacting directly with an EF backed database. For ...
0
votes
0answers
34 views
order line with bundles
I want to implement an ordering system, so I've designed a normal ordering objects with order lines, etc. How shall I relate bundles? And how can I implement it using Code first?
This is my orderline ...
1
vote
1answer
44 views
Should I ignore repository for a stored procedure that return flat data (multiple objects as a single one)?
I'm using the repository pattern as the way to access the DbContext in my C# application, however, I have a report that generates an expensive query (actually several queries) because of relationships ...
2
votes
1answer
54 views
Which is more secure for the DB, Web API or MVC with repository pattern & EF?
I am 1 of 3 developers. The other 2 use Web API and angular to build web apps. I prefer ASP MVC with a repository and EF. The stated argument is that a service is more secure when accessing the ...
0
votes
1answer
119 views
Entity framework code first for another project
I am recently developing multi-tents cloud application that can help to generate classes and dbcontext dynamically for other ASP MVC projects.
How can I do this task from my application to another ...
0
votes
1answer
93 views
Row level security with multiple rules
I need some assistance with designing a system which implements row-level security that could have multiple conditions that need to be satisfied.
Context
Suppose I have a user. A user can belong to ...
1
vote
2answers
72 views
Separating save logic from WinForm to make it reusable
I have a Windows Form for creating configs. It has around 50 fields of data, which represent a group of entities, that I need to capture when the user presses the save button. Currently, on the press ...
1
vote
0answers
49 views
How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)
I'm working with scrum methodology.
thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
-2
votes
1answer
81 views
Controllers and Separation of Concerns: discussing possible strategies
I've been working on a project based off of this tutorial.
Unfortunately, the controller classes in this are quite dense and have terrible separation of concerns. I should have realized this ...
0
votes
0answers
96 views
Should I design my Unit-Of-Work like this?
I am using .net and Entity-Framework (EF) on the back end and I would like some advice on this Unit-Of-Work (UoW) implementation.
Should I create a unit of work with one entity and multiple services? ...
1
vote
1answer
74 views
Knowledge base UI pattern
In our database backed (C# WPF / Entity Framework) application, we want to build a system to enter, store, display and search arbitrary content linked to our main entity. The challenge here is to find ...
1
vote
1answer
118 views
Using Entity Framework as substitute for SSIS, SSAS and SSRS
At the moment I have three different sources where my data are. 1. A Dataprovider, 2. inhouse access DB and 3. Salesforce. Now I want to build a datawarehouse (using ms software) where I want to store ...
3
votes
1answer
223 views
Data Layer Architecture Help
I need help architecting a data access layer using Entity Framework. Here are the requirements:
The database is preexisting, an absolute mess, and it's structure and cannot be altered
Entity ...
1
vote
1answer
270 views
What is the correct reusable architecture using Entity Framework for common database tables and services?
Context
I have a line of business application "MyApp" in C# using EF. Layers are separated as
MyResusableLib.DataAccess // Class Lib: EF based utils, extension methods,
MyApp.DataAccess // Class ...
1
vote
2answers
202 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
441 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
2answers
97 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 ...
5
votes
4answers
619 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
33 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
189 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
28 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
110 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
166 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
947 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
714 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
491 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
77 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 C#...
0
votes
0answers
188 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
376 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
808 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. However,...
1
vote
2answers
92 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
250 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
138 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 ...
1
vote
1answer
361 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
801 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
747 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
156 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
608 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 smaller....
1
vote
2answers
331 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 ...
1
vote
1answer
146 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
2answers
1k 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 { get;...
0
votes
2answers
2k 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
113 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
137 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
517 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 ...
1
vote
0answers
1k 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 ...