Skip to main content

Questions tagged [codefirst]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
58 views

What is proper approach to code first entity relationship design?

I been trying to figure out, what i hoped is a simple problem, but am yet to land with an answer. How do you go about designing an entity relationship diagram when doing code first development? The ...
Aeseir's user avatar
  • 247
0 votes
0 answers
85 views

Should I use CQRS in this case?

I'm building web API. I have a problem where input differs from the output, for example, input expects just the id and output returns entire object. Also, there are few things specific to the output ...
Konrad's user avatar
  • 1,559
1 vote
2 answers
1k views

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 ...
Rahul Jain's user avatar
0 votes
0 answers
1k views

DDD domain code first vs db first

I am using DDD approach with c# and for data storage I am using SQL server. Also I am using code first approach with fluent api in order to build database objects from domain. Since I am using domain ...
John's user avatar
  • 783
2 votes
1 answer
120 views

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; } ...
jbwebtech's user avatar
  • 121
-2 votes
1 answer
1k views

Why C# ASP.NET MVC Code First POCO Classes must have getters and setters?

Why in, C# ASP.NET MVC Code First project, POCO Classes must have getters and setters ( {get; set; } ) in order to work? public float data { get; set; } or in db context class public DbSet<SGD....
Daniel Santos's user avatar
2 votes
2 answers
5k 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 ...
Jose A's user avatar
  • 305
1 vote
1 answer
1k views

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 ...
Corb3nik's user avatar
  • 131
3 votes
0 answers
493 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 ...
King Arthur's user avatar
1 vote
1 answer
2k 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 ...
Quoter's user avatar
  • 111
2 votes
1 answer
395 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 ...
Phoenix's user avatar
  • 131
4 votes
2 answers
14k views

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 ...
joe's user avatar
  • 207
2 votes
3 answers
980 views

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 ...
Husrat Mehmood's user avatar
3 votes
1 answer
2k views

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....
Gilbrilthor's user avatar
5 votes
2 answers
6k views

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 ...
A.T.'s user avatar
  • 171
11 votes
1 answer
6k 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 ...
Lotok's user avatar
  • 1,799
6 votes
1 answer
478 views

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 ...
Felipe Pessoto's user avatar
4 votes
2 answers
3k views

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 ...
user avatar
16 votes
7 answers
16k views

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'...
RoboShop's user avatar
  • 2,810