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

Entity Framework Core - Knowledge Base (KB)

837 results for: in tag: .net-core

How do you configure the DbContext when creating Migrations in Entity Framework Core?

Is there way that dependency injection can be configured/bootstrapped when using Entity Framework's migration commands?...Entity Framework Core supports dependency injection for ...DbContext... subclasses. This mechanism includes allowing for configurati...
.net-core c# dbcontext dependency-injection entity-framework-core
asked by vossad01

Getting sqlite to work in ASP.NET 5 (vnext)

I'm trying to get "EntityFramework....SQLite...": "7.0.0-beta1" to work within ASP.NET 5....I've created my project using Yeoman and installed EF sqlite from the package manager....The project builds fine but when running I get:...Could not load file or a...
.net-core asp.net asp.net-core-mvc entity-framework-core sqlite
asked by ryan g

ASP.NET 5 Console Application (package) - How to create DBContext from connection string?

I'm trying to create DBContext from connection string on .net core. This used to work with .net 4.5:...public class MyContext : DbContext { internal MYContext(string connectionString) : base(connectionString){} } ...Now I'm getting error that the base ...
.net-core asp.net-core c# console-application entity-framework-core
asked by f0rt

EntityFramework Commands in ASP.Net 5 Class Library Package?

I am trying to develop my first ASP.Net web application and in my solution I have two projects. A ...Web Application... and ...Class Library (Package).... When I build the ASP.Net 4.5 version of this application I put my ...Entity Framework 6... entities ...
.net-core asp.net-core entity-framework-core
asked by Matthew Verstraete

Database First but only a subset of the database

I am creating an asp.net6 web application that will pull back transactional data from an existing database. Inside the database we have a lot of lookup tables that I don't have a need for. I am able to import the database with ...ef dbcontext scaffold... ...
.net-core entity-framework-core
asked by Jamie Babineau

Error during compilation with .NET 4.6.1 on a Nuget Class Library with EF core

I have a problem during compilation for two .NET class libraries. the problem occur during build targeting .NET4.6.1 (or 4.5.2, 4.6 or other, I've try all).....NET Framework 4.6 error CS0012: The type 'Func<,>' is defined in an assembly that is not refe...
.net-4.6 .net-core c# entity-framework-core visual-studio-2015
asked by cdie

Equivalent for .HasOptional in Entity Framework Core 1 (EF7)

Consider two classes....public class File { [Key] public string Id { get; set; } public string Message_Id { get; set; } internal Message Message { get; set; } } public class Message { [Key] public string Id { get; set; } ...
.net-core asp.net-core asp.net-core-1.0 entity-framework entity-framework-core
asked by Chatumbabub

How to get user information in DbContext using Net Core

I am trying to develop a class library in which i want to implement custom ...DbContext.... In the ...SaveChanges... method of the ...DbContext..., i need to get current user’s information(department, username etc.) for auditing purpose. Some part of th...
.net-core asp.net-core c# entity-framework-core
asked by adem caglin

.NET Core 1.0 and EntityFramework 7 Not Compatible

I've upgraded to Visual Studio Code 1.0.0 and I'm trying to retrofit an ASP.NET Core project I was working on in VSCode previously, before the new release. VSCode is seemingly quite different now in terms of configuration. I've worked with ...this tutoria...
.net-core asp.net-core entity-framework-core visual-studio-code
asked by robbpriestley

How to persist a list of strings with Entity Framework Core?

Let us suppose that we have one class which looks like the following:...public class Entity { public IList<string> SomeListOfValues { get; set; } // Other code } ...Now, suppose we want to persist this using EF Core Code First and that we are usi...
.net-core c# entity-framework entity-framework-core
asked by user1620696

How to update a product database by entity framework core 1.0 rc2

In entity framework core 1.0 RC1 when I published a website, it generated a ef.cmd file, I can ran ...ef database update... to update the product database. How can I do it in RC2 when there is no ef.cmd file.
.net-core entity-framework-core
asked by Qiang

How do I reference Entity Framework 6 from a .NET core class library in RC2?

I have a .NET core class library from which I want to reference Entity Framework 6.1.3. Here is my project.json:...{ "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "EntityFramework": "6.1.3" }, "framew...
.net-core .net-core-rc2 entity-framework-6 entity-framework-core
asked by SirG

Return async task using LINQ select

I want to implement function that return list of child items from database asynchronously. So I write a function:... public async Task<IEnumerable<object>> GetFiles(int parentId) { var data = from file in DB.Files where f...
.net-core asp.net-core c# entity-framework-core linq
asked by Rem

Package Remotion.Linq 2.0.2 is not compatible with netcoreapp1.0

This one is driving me crazy....If I create a .NET Core Console App in VS2015, making no changes it builds and runs as expected....When I add Entity Framework RC2 by adding a dependency in project.json...{ "version": "1.0.0-*", "buildOptions": { "...
.net .net-core .net-core-rc2 entity-framework-core
asked by Mark Chidlow

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

Showing classes from indirectly referenced packages in .NET Core

I am trying to implement basic UoW/Repository pattern with ASP.NET/Entity Framework Core and I have encountered very troubling behavior....My solution consists of 4 projects in total.....DAL project..., where my entity classes are defined and where my DbC...
.net .net-core asp.net-core c# entity-framework-core
asked by Admir Tuzović

How to do Migrations and SQL Server connection on MacOS

I'm in OSX and I'm creating a new ASP.NET Core Web API. I've followed this tutorial: ...https://docs.efproject.net/en/latest/platforms/netcore/new-db-sqlite.html...That's cool and all but what about Sql Server? Now I know SQL Server won't yet run on OSX (...
.net-core asp.net-core entity-framework-core macos sql-server
asked by Prof

Login fails after changing password ASP.NET Core

I'm using ASP.NET Core 1.0 and the identity stuff to authenticate and authorize the users. It all works fine except one single thing:...If the user resets or changes his password, he can't sign-in with the new credentials until the ASP.NET App is restarte...
.net-core asp.net-core asp.net-identity entity-framework-core identity
asked by Juergen Gutsch

How to unapply a migration in ASP.NET Core with EF Core

When I run ...PM> Remove-Migration -context BloggingContext... in VS2015 with an ASP.NET Core project using EF Core I get the following error:...System.InvalidOperationException: The migration '20160703192724_MyFirstMigration' has already been applied to ...
.net-core asp.net-core c# entity-framework-core visual-studio-2015
asked by nam

.net core 1.0.0 with entity framework core sqlite

I am trying to create a .net core application that has a connection to a sqlite database. ...I have .net core sdk 1.0 installed and have added the following Nuget-packages to my project:...Microsoft.EntityFrameworkCore.Sqlite...Microsoft.EntityFrameworkCo...
.net-core c# entity-framework-core sqlite
asked by Guido Roth

Page 1 of 42
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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