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)

12 results in tag: seeding

Seed initial data in Entity Framework 7 RC 1 and ASP.NET MVC 6

It seems that in Entity Framework 7 there is no native support for seed data yet (...https://github.com/aspnet/EntityFramework/issues/629...)....There is no ...DbMigrationsConfiguration... class, no ...Seed... method in the template code provided by Micro...
asp.net-core-mvc c# entity-framework entity-framework-core seeding
asked by Nikolay Kostov

Entity Framework Core 1.0 - How to seed a large amount of data

I am using an ASP.NET Core 1.0 (previously known as ASP.NET 5) application with the core framework and Entity Framework Core 1.0 (previously known as Entity Framework 7)....In this blog ...https://blogs.msdn.microsoft.com/dotnet/2015/11/18/entity-framewor...
asp.net-core entity-framework-core seeding sqlbulkcopy
asked by diegosasw

Asp.net core Identity "The INSERT statement conflicted with the FOREIGN KEY constraint "

I create ASP.NET CORE application with ASP.NET CORE Identity. I create seed class for saving new users and roles for first startup application. Inside this seed class I get following error when I add Role To User....The INSERT statement conflicted with t...
asp.net-identity asp.net-mvc c# entity-framework-core seeding
asked by Elvin Mammadov

What is the proper way to fix data on the database using .net Core?

We have to add some rows in our current database. My boss tells me to use migrations for it (we have a .net core app, and are using EF core 1.1.1). I am unsure on how to proceed, I had the understanding that migrations were a "database schema modification...
ef-migrations entity-framework entity-framework-core seeding
asked by Alejandro B.

Better way to Seed a Dot Net Core Entity Framework Database?

I'm working to seed a database I'm creating for a United Way I'm volunteering for. (Check out TapRoot+ if you are interested in volunteering and applying some learning)...Anyways, I'm only seeding one to many fields right now, but I've gotten it to work o...
.net-core c# entity-framework-core seeding sql-server
asked by A.Rowan

EF Core 2.1 HasData() creating deletes and re-inserts for unchanged entities on subsequent migrations

Update 8/29/18...Seeing this issue in inline ...new...-ing of seed data as well. Opened an ...EF Core issue.... Will update the question with any findings....I am trying to use ...EF Core 2.1's seeding mechanism.... However, I want to load the seed data f...
c# entity-framework-core seeding
asked by Collin M. Barrett

EF Core 2.1.1 Seed data not working with override double

could you tell me why in my DB i get ...0... values on after ...Seed method...? This is how it looks like:...public static void Seed(this ModelBuilder modelBuilder) { int countOfWorkers = 10; for (int i = 0; i < countOfWorkers; i++) ...
asp.net-core c# entity-framework-core seeding
asked by michasaucer

EF Core 2.1.1 Seed method with consturctor call

Why property setted in constructor of seeding class is equal to 0? I have my own seed method:... public static void Seed(this ModelBuilder modelBuilder) { Random random = new Random(); int range = 20; // for doubles int cou...
asp.net-core c# entity-framework-core seeding
asked by michasaucer

EF Core 2.1 with Seed method and NotMapped attribute

I have a question, why my ...Strategy... property is null, when i getting all ...DbSet... from context? How to ...[NotMapped]... property make visible in my backend?...My class looks like this:...public class Machine { [Key] public int Id { get; s...
asp.net-core c# entity-framework-core seeding
asked by michasaucer

Asp.Net Core - How to seed data - Object reference not set to an instance of an object

After converted all my tables to start using Guid type in identity columns, I failed to seed data, so I simplified a lot the code to localize the error, and ended with a seeding class as follows:...public class SeedTest { private readonly MyDbContext ...
asp.net-core c# entity-framework-core seeding
asked by Sami-L

Proper way to update data in lookup tables with EFcore / ASP.net core? Do I do this in the seed method or another way?

Right now I am in development and use the code below to seed the lookup tables. But once it is in production and I want to add additional data how do I do that ? Do I use some sort of AddOrUpdate (not in core) in the seeding method ? Write a SQL script ?...
asp.net-core entity-framework-core seeding
asked by punkouter

How to restart postgres sequence with Entity framework seeding migration?

I have the following database seeder: ...public partial class Seed_Languages : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.InsertData( table: "Languages", ...
.net-core .net-core-3.1 entity-framework-core postgresql seeding
asked by Aleksej_Shherbak

Page 1 of 1
  • 1

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!