0
votes
1answer
76 views

Confused on how to properly employ a Repository Pattern with Service/Business Layer on top

I'm building a ASP.NET Web Api 2 solution for learning purposes, and I've hit a snag. I was wondering if anyone could tell me what exactly it is that I'm missing. My Web Api solution has 4 Layers: ...
0
votes
0answers
11 views

Dynamic Data won't display calculated fields; ASP.NET 4.5, Entity Framework 5.0 [migrated]

I'm trying to display calculated fields in my Dynamic Data Entities site. I have generated my EDMX file from an existing database, and have added customizations in a separate file using partial ...
0
votes
1answer
93 views

Entity Framework 6 Conventions

I use the Entity Framework often, but I have one area of confusion I would like to understand better. If I wanted to have a navigation property in an Entity such as public virtual ExampleObject ...
0
votes
0answers
132 views

What's the best way to expose a Model object in a ViewModel?

In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I ...
3
votes
1answer
81 views

Why DbContext object shouldn't be referred in Service Layer?

I've been looking for some implementations of Service Layer and Controller interaction in blogs and in some open source projects. All of them seem to refer DbContext object in repository classes but ...
1
vote
2answers
257 views

Correct way to inject dependencies in Business logic service?

Currently the structure of my application is as below Web App --> WCF Service (just a facade) --> Business Logic Services --> Repository -> Entity Framework Datacontext Now each of my Business logic ...
0
votes
1answer
140 views

In what situation do Entity Framework enums become useful?

I am working on a project where there will be plenty of static options being stored in the database. I looked at using Enums for this, but do not see how they could be useful. They do not create any ...
1
vote
1answer
154 views

entity framework 6 agnostic enough different sql server and OS platforms?

It's my first time using sql server, I usually go with MySQL, so I'm unsure how to do this. The project I'm assigned will be deployed to multiple platforms particularly PC's with different SQL server ...
0
votes
1answer
136 views

Claim based authorization for application framework? [closed]

I am developing a framework that makes common data management tasks easier for a couple of future applications built on top of it, including document management, data versioning, retention, locking ...
2
votes
5answers
281 views

Create Database To Fit Data vs Make Data Fit The Database

I'm newish to programming and would like to know what people have found to be the most supportable option or rather what people find more understandable. I'm the only one writing code at my firm, but ...
1
vote
1answer
210 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 ...
1
vote
2answers
419 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 ...
2
votes
1answer
458 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
148 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
1k 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
3k 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 ...
7
votes
3answers
5k 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
431 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
207 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 ...
0
votes
2answers
801 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 ...
0
votes
1answer
353 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 { ...
4
votes
1answer
382 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 ...
2
votes
4answers
580 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 ...
6
votes
1answer
1k 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
3answers
541 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 ?
0
votes
2answers
350 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 ...
5
votes
1answer
367 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 ...
0
votes
1answer
3k 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 ...
12
votes
4answers
3k 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
1answer
580 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
2answers
329 views

How far should an entity take care of its properties values by itself?

Let's consider the following example of a class, which is an entity that I'm using through Entity Framework. - InvoiceHeader - BilledAmount (property, decimal) - PaidAmount (property, ...
14
votes
5answers
10k views

Is There a Real Advantage to Generic Repository?

Was reading through some articles on the advantages of creating Generic Repositories for a new app (example). The idea seems nice because it lets me use the same repository to do several things for ...
8
votes
2answers
5k views

Dependency injection with n-tier Entity Framework solution

I am currently designing an n-tier solution which is using Entity Framework 5 (.net 4) as its data access strategy, but am concerned about how to incorporate dependency injection to make it testable / ...
4
votes
3answers
4k views

Is Entity framework reliable enough to use in a Corporate Project? Should I use Entity? [duplicate]

Possible Duplicate: Is Entity framework reliable enough to use in a Corporate Project? Should I use Entity? I'm a junior developer who's just completed a project using Entity framework. ...
1
vote
1answer
407 views

Abstraction Layer over ORM Generated Entities

I am learning LINQ to SQL (and planning to learn Entity Framework). Initially I used a abstraction layer to convert LINQ to SQL entities into a domain objects. Later I discovered the “Inheritance ...
3
votes
3answers
640 views

Proper & Efficient Structure for an entity layer?

Context Web application based on the .NET Framework written in C# and following the MVC design pattern. Question What is the most efficient way to structure an entity layer consisting on various ...
2
votes
2answers
389 views

Is it considered best practice to dynamically bind return types from the Entity context?

MyDbEntities context = new MyDbEntities(); var result = context.StoredProcedureName(userId); In the situation above, is it considered best practice to use var or ObjectResult<ComplexType>?
3
votes
5answers
541 views

Using XML field Vs. creating a table for unstable organization

I am in the middle of design an application to issue and store invoices for an organization. The problem is the organization is not stable at all. There are many types of invoices and they may ...
11
votes
3answers
8k views

Entity Framework and layer separation

I'm trying to work a bit with Entity Framework and I got a question regarding the separation of layers. I usually use the UI -> BLL -> DAL approach and I'm wondering how to use EF here. My DAL would ...
11
votes
3answers
4k views

Is it a good practice set connection strings in a web config?

Recently I have a discussion with some of my colleagues at my work because they said that it's better have in a .DLL a string connection encrypted. And I said why just don't use the string connection ...
8
votes
2answers
1k views

EF vs. NHibernate [closed]

In the past 2 years since I started writing business applications (before I did either high level front end or very low level systems programming), learned datasets, linq to sql, and now entity ...
2
votes
3answers
305 views

Is EF4 mature enough with MySQL or Oracle?

Is Entity Framework 4 with MySQL or Oracle mature enough to be used on production level web application? Can it provide high level of performance, or should we stick with just plain data access with ...
2
votes
4answers
2k views

Should I be learning Linq, Direct SQL Commands (in .net), EF or other? [closed]

Basically, I have a very good knowledge of plain old SQL coming from Classic ASP programming. Over the past couple of months, I have been learning C# and today was my first full day at MVC 3 (Razor) ...
3
votes
3answers
816 views

Entity Framework limitation

I was wondering if anyone had the same need and why (if possible). My problem is: I can't create a model in EF using two tables from different DBs without some weird workarounds. For my scope that ...