ef-database-first Questions

3

Solved

I'm playing around with Entity Framework Core and I have been working on implementing a Database-First application. The initial Scaffold-DbContext command works just fine and creates all my entitie...
Shipboard asked 31/10, 2016 at 14:43

9

In every SQL table in our application we have "CreatedDate" and "ModifiedDate" column. We are using DB first approach. When i save the data, i want these two column automatically populated. One app...
Highchair asked 17/5, 2016 at 20:45

3

Assuming I have the following table in my DB: CREATE TABLE [dbo].[Test] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Active] BIT DEFAULT ((1)) NOT NULL, ) When creating an EF model from this DB, the ...

2

Solved

I have a big database existing database to comunicate with, and I'm using EF 5.0 database first, the problem I'm having is that if I create any data decoration like [stringlength(50)] on the class ...
Josefinejoseito asked 19/7, 2013 at 11:8

20

I am trying to update a record using EF6. First finding the record, if it exists, update. Here is my code: var book = new Model.Book { BookNumber = _book.BookNumber, BookName = _book.BookName, B...
Octoroon asked 17/9, 2014 at 15:26

1

How can I scaffold EF Core directly from a Visual Studio SQL Server Database Project? Solutions such as the following are preferred: scaffold-dbcontext -connection "provider=ssdtproject, name=myp...

3

I'm getting a strange error while using EF 5 using a Database First approach on the designer. The error is saying 'value cannot be null parameter name: font'. I also get a big red X over the design...
Windpollinated asked 11/9, 2012 at 22:10

2

Solved

Working with ASP.NET CORE EF, I have generated model classes from existing database with following command: Scaffold-DbContext "Server=myserver\mydb;Database=mydb;Trusted_Connection=True;" Microso...
Agriculturist asked 20/11, 2019 at 11:31

4

Assumptions Using EF 6.1, MVC 5, VS 2013, C# I have an existing database model designed in Toad DM for SQL Server and it's very important keep it always updated Steps and Notes Using ADO.NET ...

7

I have added a new column to a table in my database. The table is already defined in the existing Entity Framework model. I've been through most of the items here on how to do this and it still fai...
Poff asked 11/3, 2016 at 22:6

2

I have a database that contains a couple of composite foreign keys. For example, here is the generation script for the foreign key: ALTER TABLE [dbo].[WorkingRosters] WITH NOCHECK ADD CONSTRAINT [...

1

I am using Entity framework v 6.1.1 in my application. My database has 2 tables User, Location. User table ----------- UserID HomeCityId(FK -> LocationId) CurrentCityId(FK -> LocationId) Lo...

1

Until now I've been using EF6 with Visual Studio, mostly code first, rarely database first. To import some test data, someone gave me the connection to a database in MySQL. In MySql Workbench I ca...
Numbing asked 16/1, 2017 at 9:4

7

I've been researching a lot online but did not find a proper solution. I was trying to use Entity Framework Core with MySQL by using database-first scaffold method to mapping table model while alwa...

4

Solved

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 name...

3

Solved

I'm trying to build a simple CRUD app using Blazor in Visual Studio 2019 - I have watched over 7 tutorials between YouTube, PluralSight, and Channel 9, and in all of them, they use Entity Framework...

2

Below are my 2 class sharing 1 to many relationship : public partial class Employee { public int Id { get; set; } public string Name { get; set; } public virtual ICollection<Skills>...
Judgemade asked 27/9, 2017 at 14:49

2

Solved

I'm trying to build an aspnetcore application over an existing system where the database is already created, and I'm going to add some tables over it. I've reverse engineered the database to add t...

3

Solved

We are using Entity Framework database-first for our Oracle database. For some reason Number(5) becomes Int16 - short Max Number(5) value is 99999 Max Int16 value is 32767 Problem... is there a ...
Quinquefid asked 9/9, 2012 at 14:25

3

I use this tutorial to create a Database model. I decided to create another assembly for abstractions such as IRepository, IFooService by reading this quote of "Programming .NET Components" by Juw...

10

Solved

What are the pros & cons of using Entity Framework 4.1 Code-first over Model/Database-first with EDMX diagram? I'm trying to fully understand all the approaches to building data access l...

3

Context Currently I am creating an Extract, Transform and Load (ETL) application written in C# with .NET Core. The target of the ETL application is a database that is accessed through Entity Frame...

2

Solved

I'm using ASP.NET Identity (Database First) in my ASP.NET MVC application. I followed the instructions here, to set up the ASP.NET Identity with database first approach. My AspNetUsers table has ...
Shoshone asked 20/8, 2018 at 16:9

4

Solved

So here is the deal, I have changed my database schema, and changed the PK for one of my tables and I have removed everything related to the old PK (FK reference in another tables). However I hav...

5

Solved

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 sho...

© 2022 - 2024 — McMap. All rights reserved.