zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

43 results in tag: ef-database-first

Entity framework nesting complex types

I have a stored procedure that returns multiple result sets. Each one is a complex type. The first result set would contain a list of items of the same complex type as the second result set, etc. These do not cleanly correlate to specific entities. Fo...
ef-database-first entity-framework entity-framework-6
asked by ChristyPiffat

EF 6 database first: How to update stored procedures?

We are using ...Entity Framework 6.0.0... and use database first ...(like this)... to generate code from tables and stored procedures. This seems to work great, except that changes in stored procedures are not reflected when updating or refreshing the mo...
ef-database-first entity-framework entity-framework-6 stored-procedures visual-studio-2013
asked by Halvard

MVC 4 and EF6 database first: issue with mapping

I am following along Pro ASP.NET MVC 4 by Adam Freeman on VS 2010 (I downloaded the MVC 4 template online). I have worked with the .edmx file before, but in Chapter 7 he does not do this. I setup a basic connection string with SQL Server in my web.config ...
asp.net-mvc-4 c# ef-database-first entity-framework entity-framework-6
asked by jmzagorski

Upgrade from Entity Framework 5 to 6

After upgrading our project from using Entity Framework 5 to Entity Framework 6 (though NuGets update function) i get the following error on my generated Entities class:...Error 1 The type or namespace name 'Objects' does not exist in the namespace 'Sy...
c# ef-database-first entity-framework entity-framework-5 entity-framework-6
asked by RossBille

Entity Framework 6 database first many to many relationship

I am trying EF6 and trying to utilize a many to many relationship....Using Database first here is my scripted out database....CREATE TABLE [States] ( Id int identity (1, 1) not null primary key, Name varchar(50) not null, Abbreviation varchar(...
c# ef-database-first entity-framework entity-framework-6 many-to-many
asked by EvilToaster101

Change entity framework database first auto generated domain classes

Can i change entity framework database first auto generated classes (under .tt) to derive from a base class (BaseEntity)?...Some of my domain classes has two property (CreateDateTime & CreateUserId) and i want to set this properties automatically before S...
c# ef-database-first entity-framework entity-framework-6
asked by Mohammad Zare

Entity Framework 6 Model-First - Update Production Database Based On Local Changes

I'm new to EF and inherited a project that apparently used database-first development....The production environment uses SQL Azure and I'm basically trying to figure out the standard approach for updating its schema. ...At first, I tried enabling migratio...
azure-sql-database ef-database-first ef-model-first entity-framework entity-framework-6
asked by Colin

How to update record using Entity Framework 6?

I am trying to update record using EF6. First finding the record, if exists, update it. Here is my code:-...var book = new Model.Book { BookNumber = _book.BookNumber, BookName = _book.BookName, BookTitle = _book.BookTitle, }; using (var db =...
c# ef-database-first entity-framework entity-framework-6
asked by user1327064

Complex type inside Database-first model of a DDD project

Let’s say in my EF6 project [Database-first approach] I have a complex type called ...Address... [just to clarify my complex type does not have any identity and is only a merge of aggregation of standalone data and it is not even responsible for its own...
.net c# ef-database-first entity-framework entity-framework-6
asked by MHOOS

Entity Framework 6.1 : The given key was not present in the dictionary

I have a table with some relations, the program works fine until I add a new relation between this table and ...customer... table, the ddl for ...PermissionCode... Table (first table) is as below:...CREATE TABLE [dbo].[PermissionCode] ( [Id] int NOT NULL ...
asp.net-mvc ef-database-first entity-framework entity-framework-6 sql-server
asked by Mesut Talebi2

Generate Enum from Lookup Tables - EF 6

This might sound repeated but I have gone through all the available posts but could not figure out the best method in EF 6 version....I have two tables...PersonPhone (PersonID, PhoneTypeID) PhoneType(PhoneTypeID, Description) ...PhoneTypes as just look u...
c# database-first ef-database-first entity-framework entity-framework-6
asked by techspider

Entity Framework - DB-First - Composite Foreign Keys

I have a database that has a table with a 2-column primary composite key (one int, one bigint.) I have two tables that have a composite foreign key, referencing the first table's composite primary key. The relationships are (as far as I know,) fine and ...
composite-key database-first ef-database-first entity-framework entity-framework-6
asked by Bryan Morgan

Migrate database-first to code-first - switch from publish to migrations

We need to migrate an existing project from database-first to code-first. Each environment (DEV, TEST, PROD) has a slightly different version of the database. The differences are the changes in DEV that may not have been pushed to TEST and PROD....--...
ef-code-first ef-database-first ef-migrations entity-framework entity-framework-6
asked by Don Chambers

EntityFramework refuses to forget old columns

I'm using EntityFramework 6.1.3, database-first. I am currently wishing I had chosen code-first......I have a database with some tables. I've previously built my edmx off of these tables. Then I changed the type of a few columns and added a few columns. ...
c# ef-database-first entity-framework entity-framework-6
asked by Nacht - Reinstate Monica

How can I call a SQL Stored Procedure using EntityFramework 7 and Asp.Net 5

For last couple of days I am searching for some tutorials about how to call a ...Stored Procedure... from inside a ...Web API... controller method using ...EntityFramework 7.......All tutorials I came through are showing it the other way round, i.e. ...Co...
asp.net-core-mvc c# ef-database-first entity-framework-core sql-server
asked by Subrata Sarkar

Entity Framework Database first multiple schemas duplicate table names

I'm working with an existing database that has multiple schemas. In addition, different schemas duplicatate table names. Code First deployment is not an option....When generating my edmx, I'm hitting multiple issues, but the main one I'm concerned about...
ef-database-first entity-framework entity-framework-6
asked by Allen Jergensen

Multiple EF6 DB Models with same Entity names conflicting and getting overwritten, How to set model output directory in EF6?

I am working with ...EF6... and generating models (database-first) from multiple databases. Some databases have same table names so when model is generated they start conflicting. To solve ...namespace... problem I went to ...Model.tt... file properties i...
c# ef-database-first entity-framework entity-framework-6 t4
asked by Matas Vaitkevicius

Error when scaffolding using Entity Framework Core in ASP.Net core

I am trying to create models using an existing SQL Server 2016 database. When the run the command prompt as shown in the documentation:...PM> Scaffold-DbContext "'Server=techestatevm.southeastasia.cloudapp.azure.com;Database=Blogging;User Id=newuser;Passw...
.net-core asp.net-core asp.net-core-mvc ef-database-first entity-framework-core
asked by Vinod

Entity Framework Core retrieve single object from table

I am trying to retrieve a single row from my table using Entity Framework core. This seems to be very simple, but i cannot get it to work....I am able to get the list by using ..._context.COUNTRY.ToList();...This gives me the full list of countries in my ...
ef-database-first entity-framework-core
asked by Vinod

How to add Data Validation in EF Core with Database First approach?

I am implementing a MVC-Webapplication with ASP.NET Core (RC2) and as ORM Entity Framework Core. Since I already got a database design, I have to create the entity models by the Scaffold-DBContext command....This works fine. Now, I want to add some annota...
c# ef-database-first entity-framework entity-framework-core validation
asked by user1885888

Page 1 of 3
  • 1
  • 2
  • 3
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!