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)

55 results in tag: asp.net-core-2.1

Core 2 Keep domain models in sync with database changes

Need help! I am new to Core 2.0 and VS 2017 and haven't had much experience with MVC. I have an existing database that I need to use with a core 2.0 project at work. I was able to use the Scaffold-DbContect to initially create the domain models from the e...
asp.net-core-2.1 database-first ef-migrations entity-framework-core
asked by CJohn Ransom

Changing IdentityUser Type in ASP.NET Core 2.1

I want my ...User... to have a ...Guid... as the primary key, but when I create my own user type, my website throws an exception on startup. ...Anyone knows how to change IdentityUser type? ...I did this:...services.AddIdentity<MyUser, MyRole>() .AddE...
asp.net-core asp.net-core-2.1 c# entity-framework-core
asked by Zeus82

Upgrade to 2.1 breaks existing .net core EF logic

I have 2 objects with a FK relationship between them. All of this logic worked fine when i was using .net core 2, but broke when i upgraded to 2.1...public class Parent { [Key()] public Guid ParentGUID {get;set;} public string SomeValue {g...
asp.net-core asp.net-core-2.1 entity-framework entity-framework-core
asked by Phil

Is it possible to automatically map a DB view on Entity Framework Core version 2.1?

I found ...this interesting question on stackoverflow... about mapping a view and working with it in EF Core. ... According to ...its answer..., with previous EF Core versions wasn't possible to automatically map views....But what now? According to the ..
asp.net-core asp.net-core-2.1 c# entity-framework-core
asked by Deadpool

UseSqlite with Entity Framework Core in ASP.NET Core 2.1 not working

I am starting a Razor pages project in ASP.NET Core 2.1. I am trying to use SQLite but when configuring the database only SQL Server seems to be an option....Startup.cs...using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Micros...
asp.net-core-2.1 entity-framework-core sqlite
asked by nick

IHostingEnvironment how to pass OnModelCreating?

I want to create some dummy data that I will load from a json file. I need to get the path to the file, from my research I found that I need IHostingEnvironment but I am not sure how to get the property in my DbContext class file.
asp.net-core-2.1 entity-framework-core
asked by chobo2

Services.CreateScope() Missing in Asp.net Core 2.1

What replaced Services.CreateScope() in 2.1?...I am trying to follow this tutorial but it seems like stuff has changed quite a bit...https://dotnetthoughts.net/seed-database-in-aspnet-core/
asp.net-core-2.1 entity-framework-core
asked by chobo2

Multiple Foreign Keys EF Core 2.1 code first generates only 1 in DB

I have the following model:...public class User : AuditedModel { public string Login { get; } public string PasswordHash { get; } public User(string login, string password, User creationUser) : base(creationUser) { Login = login; ...
.net-core-2.1 asp.net-core asp.net-core-2.1 ef-core-2.1 entity-framework-core
asked by Antonio Casagrande

Use Where Clause on navigation property. Many-to-many relationship

I have been looking through other examples on SO and I am still unable to resolve this....I have the following model structure... public class Event { [Key] public int ID { get; set; } public ICollection<EventCategory> EventCat...
asp.net-core asp.net-core-2.1 c# entity-framework-core linq
asked by el_M

Link ASP.Net Identity table to a user detail table

I am trying to link my Identity user table to a user detail table I have created to track other user information. That user detail table is called UserProfile....I came across this link but it is not working in .NET Core 2.1: ...Link ASP.NET Identity user...
.net asp.net-core asp.net-core-2.1 asp.net-identity entity-framework-core
asked by TheNameHobbs

Asp.Net Core 2.1 add-migration is not picking up properties in class that inherits from IdentityUser

I am working on an ASP.Net Core 2.1.1 web application in VS2017 v15.8.2, using the web application template with individual user accounts. ...I want to add more properties to the IdentityUser so I created an ...ApplicationUser... class that inherits from ...
asp.net-core-2.0 asp.net-core-2.1 asp.net-identity ef-core-2.1 entity-framework-core
asked by whiskytangofoxtrot

Many to many self reference table - guid Id changes itself

I have a many to many table that references. Itself it sounds crazy so here's an image for a better view of the problem ...https://i.stack.imgur.com/lj2zZ.png...I use guids as primary and foreign keys. When I try to add a new instance of ...Foo... to the...
.net asp.net-core asp.net-core-2.1 entity-framework-core entity-framework-core-2.1
asked by john

How Do I make a Razor Form for a complex EF Model

I am beginning to wonder if what I am about to ask is even possible.. But it SHOULD be. ...The MS examples are woefully short of what I am after so maybe EF isn't designed the way I thought. (BTW Scaffold for CRUD for each individual table works great. Bu...
asp.net-core-2.1 c# entity-framework entity-framework-6 razor-pages
asked by CBERBER

.net core 2.1 multiple DbContext for same database

I am using .Net core 2.1 + EF Core to build WebApi. Based on this discussion: ...Entity Framework: One Database, Multiple DbContexts. Is this a bad idea?... and the bounded context concept from DDD I want to create multiple DbContext for different functio...
asp.net-core-2.1 dbcontext entity-framework entity-framework-core
asked by Ramūnas

Access MySql with Entity Framework Core

I try to connect my MySQL database to the test code of the ASP.NET Core (v2.1) application. I created a sample application and added the ...MySql.Data.EntityFrameworkCore... nuget package......Bellow is my code: ...// Context public class EntriesContext: ...
asp.net-core asp.net-core-2.1 c# entity-framework-core mysql
asked by Serge

Entity Framework v2.1.3: Order property (list of objects) of object

Poorly worded title, I know....I have an object ...User... that has an property (a list of objects) ...(ICollection<Alert>) Alerts.... I want to order the alerts by the Alert's property ...(DateTime) LastActivatedDt...I tried (within a method w/ a paramet...
asp.net-core-2.1 c# entity-framework-core
asked by JED

FreeText in EF2.1: The 'FreeText' method is not supported because the query has switched to client-evaluation.

I'm trying to do simple fulltext search:...var dbquery = _dbContext.Contents .Where(c => EF.Functions.FreeText("Content", "a")); var result = dbQuery.ToList(); ...but I'm getting:...InvalidOperationException: The 'FreeText' method is not supported b...
asp.net-core-2.1 c# entity-framework-core
asked by Liero

ASP.NET Core 2.1 Entity Framework Core Related Data Duplication

I'm trying to build an ASP.NET Core API which returns an object containing some of related, joined, data....But when I call an Article model using Include(), it's mapped automatically by EF Core. Which is intended, but.. unexpected mapping is occurring...
asp.net-core-2.0 asp.net-core-2.1 asp.net-core-webapi entity-framework-core
asked by Jason Kim

.net core - unit of work generic repository pattern

I am Looking to migrate a large project that gathers information about products. The current application uses CSLA as its framework (traditional aspx forms). ...I am wanting to migrate / develop the application over to .net core 2.1. I have experience of ...
.net .net-core asp.net-core asp.net-core-2.1 entity-framework-core
asked by Paul

What should be configured on Azure before publishing an ASP.NET Core web application?

I have an ASP.NET Core MVC application along with Entity Framework Core. Now I would like to host that application in Azure. I am new to Azure, so I don't know what needs to be configured on Azure before publishing the application to Azure.
asp.net-core-2.1 azure entity-framework-core
asked by Ashish Rathi

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!