Questions tagged [codefirst]

19 questions
16
votes
7 answers

Is CodeFirst intended for large scale applications?

I've been reading up on Entity Framework, in particular, EF 4.1 and following this link ( http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx) and it's guide on Code First. I find it neat but I was…
RoboShop
  • 2,770
  • 6
  • 29
  • 38
11
votes
1 answer

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 I have to choose between code-first with…
Lotok
  • 1,759
  • 2
  • 17
  • 27
6
votes
1 answer

Managing Entity Framework at Enterprise Projects (with hundred of tables)

I am using Entity Framework at my work and faced some problems. Usually I hear about creating tiny Edmx´s files containing tables related to some Domain ie.: Help Desk Edmx, HR Edmx, etc. Instead of load all tables in one big Edmx, what would be…
5
votes
2 answers

DbFirst vs Code First? what should I use if I rely on Stored procedures

This question is asked many times, and I always prefer code-first as I like to keep the logic in code. But now I have a challenge to load screen under 5 seconds and very little time to do things. I have large set of records, and I'm possibly going…
4
votes
2 answers

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 of user tables, classes, authorization and…
joe
  • 207
  • 1
  • 2
  • 10
4
votes
2 answers

Bill of materials database design in EF codefirst?

I'm having trouble generating a proper database design for bill of materials in EF Code-first I just need a general structure then ill add additional fields So i need to have a Product that is assembled from other Products which are assemblies of…
Seeker
3
votes
0 answers

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 objects that I'm generating the entities from. …
King Arthur
  • 131
  • 2
3
votes
1 answer

How to split up ASP MVC Project using Code-First Entity Framework

For an academic exercise, we have been tasked with creating a small website. We have already gathered the requirements and fleshed out the business domain to see the classes we are supposed to support. It is to be on Microsoft stack, so I decided to…
2
votes
1 answer

How to Structure Data Models as Detail or Stub in C# using Code First?

Say I have a product listing backed by a SQL table. It's a large data model (truncated here for brevity) but let's say looks like this: public class Product { public int Id { get; set; } public int Number { get; set; } public string…
jbwebtech
  • 121
  • 2
2
votes
2 answers

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 don't know much about DBs): Joins are expensive;…
Jose A
  • 275
  • 3
  • 12
2
votes
1 answer

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 link. I am developing a software which uses a…
Phoenix
  • 131
  • 4
2
votes
3 answers

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 datatype? Specifically, while we have to match SQL…
1
vote
2 answers

Connect to different database based on URL

I am developing a SAAS application where : A single web application is hosted in IIS which will serve to multiple companies and each company will have its own database. The web application and databases will be running on the same server. My…
1
vote
1 answer

Code First Approach and Business Classes Validation

I have a solution split into two projects : A class library containing all of my model classes (lets call it Business), and an ASP.Net MVC project. My Business classes are meant to be generic and work for multiple types of projects. For this reason,…
Corb3nik
  • 131
  • 6
1
vote
1 answer

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 concerns are how to deal with database changes without…
Quoter
  • 111
  • 3
1
2