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)

6642 results

ASP.NET Core Identity with ClearDB MySql

I am trying to establish User Identity in my ASP.NET Core 1 Application, which hosted in Azure. Also, I have got an ClearDB MySQL DataBase....And I cannot find a right way to connect my application to the MySQL db. There are some pages (...one..., ...two....
asp.net-core asp.net-core-mvc asp.net-identity entity-framework-core mysql
asked by Alex

Create Tables on runtime in EF Core

I know I can use the following command to add a new migration and create the database :...dotnet ef migrations add MigrationName -c DbContextName dotnet ef database update -c DbContextName ...but I need to create my database/tables on runtime....First I t...
entity-framework-core
asked by Ali Foroughi

Proper way to get current User ID in Entity Framework Core

There are a bunch of different answers floating around here for the different RC's of ASP.NET Core on how to get the ID of the currently logged in user. I wanted to ask the definite question here. Please note that project.json now has "Microsoft.AspNetCor...
asp.net-core asp.net-identity entity-framework-core
asked by Reza

Entity Framework core .Include() issue

Been having a play about with ef core and been having an issue with the include statement. For this code I get 2 companies which is what i expected....public IEnumerable<Company> GetAllCompanies(HsDbContext db) { var c = db.Company; return c; } ..
c# entity-framework-core
asked by John Morrison

Lock database row on Read with Entity Framework Core

How is it possible to lock a row on read with EF Core? I found an easy solution using ...TransactionScope...'s but they don't seem to work (class not found)...The problem is when deleting an item, which I do in a thread, and press the delete button twice,...
c# entity-framework-core multithreading
asked by dnanon

How to create Mapping rules for custom entities in EF6?

I am new to Entity framework.I got an opportunity to work EF6 using code first approach .When through some concepts in google for creating mapping rules for custom columns i found one way ...OnModelCreating()... Is there any other way other than this so t...
entity-framework entity-framework-6
asked by user3883423

How to do data migrations inside an EF Core code first migration?

I have a Code First EF Core project....In my schema migration, I need to do a data migration to an external database. So I can't fall back on ...migrationBuilder.Sql().... What I need to do is run a query on the local database and insert the data return...
c# entity-framework entity-framework-core
asked by Shaul Behr

How to set another value on a boolean with defaut value with Entity Framework Core?

I got quite the same problem in this question : ...How to override SQL Server default value constraint on a boolean when inserting new entity? [closed]...Like him, I get the good value of my boolean from the client to the controller, false, but it's set t...
boolean c# default-constraint entity-framework-core sql-server
asked by Korgoth

Entity Framework read queries locking all database

I'm developing a web application using ASP.NET MVC and EF6 to access the database....One of the features of my web application allow the user to download a Excel file. The query to get the information from the database takes like 5 seconds and I notice th...
asp.net-mvc c# database entity-framework entity-framework-6
asked by FxmL

Exception when trying to use `ThenInclude` in EF Core

I'm using ...Entity Framework Core... together with Repository Pattern and I'm having one issue....I have classes ...Customer..., ...Company... and ...Email... which, hiding things not relevant here, look like the following:...public class Email { pub...
.net .net-core c# entity-framework entity-framework-core
asked by user1620696

'Microsoft.EntityFrameworkCore.Tools' is not installed in project on Scaffold-DbContext

I'm following the tutorial listed here:...https://docs.efproject.net/en/latest/platforms/aspnetcore/existing-db.html...However, instead of including the DB context in the WebApplication project, I'd like the DB Context, Entities, etc to live inside anothe...
asp.net-core c# entity-framework-core
asked by RoboKozo

Get Display Enum in LINQ

How get a display/description enum in LINQ query?...For example... var query = dbo.Records.AsQueryable() .Select(x => new { Id = x.Id, Care = new { x.S...
c# entity-framework entity-framework-6 linq
asked by user98498

How to Eager Load associated data in EF Core?

I have a Gig Model as follows:...public class Gig { public int Id { get; set; } [Required] public ApplicationUser Artist { get; set; } [Required] public string ArtistId { get; set; } public DateTime DateTime { get; set; } [...
asp.net-core entity-framework entity-framework-core
asked by Reza

EntityFramework 6 Code-based configuration of connection string for database-first

I'm attempting to make an existing application work without an app.config (it is required due to a very specific environment). Problem is that it's heavily relying on EntityFramework 6 to work with an SQL-Server....I'm trying to use a ...code-based config...
.net c# entity-framework entity-framework-6
asked by user3223738

EF Core removerange items not removed on transaction

Here's my prblem...using (var db = new CassaContext()) { var DbSet = db.GetByName(item.Name); DbSet.RemoveRange(DbSet); for (var i = 0; i < data.Count; i++) { JObject jitem = data[i] as JObject; var d...
c# entity-framework entity-framework-core sqlite uwp
asked by thepasto

EntityFramework database first - type mapping - map binary(8) from SQL to int in C#

Inside SQL I have table that have primary key as binary(8). When I add that table to my model using ...Update Model from Database... I can see that this column has type=...Binary...and in C# I get that column as ...byte[].......Can I map that column to in...
c# entity-framework entity-framework-6
asked by Misiu

Could not load type 'XXX' from assembly 'XXX'. at.OnModelCreating(DbModelBuilder modelBuilder)

After i have built my model i want to review it so i try to use EntityFramework Power tools to get the model visually , but i get the following error :...System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocati...
c# ef-code-first entity-framework entity-framework-6 visual-studio-2015
asked by Anyname Donotcare

The Include path expression must refer to a navigation property defined on the type.in eager loading

I try to include anonymous type like this : I want all ...incomelist... attributes in addition to ...CompanyTitle... ,...PeriodTypeName... )... var incomeList = ctx.IncomeLists.Include(i => new { CompanyTitle = i.Compan...
asp.net c# entity-framework entity-framework-6 linq
asked by Anyname Donotcare

EF: The property 'Street' is not a declared property on type 'Address'

I'm getting the following error when I try to get all the ...Suppliers... with Entity Framework 6.1....The property 'Street' is not a declared property on type 'Address'. Verify that the property has not been explicitly excluded from the model by usin...
c# entity-framework entity-framework-6
asked by w00

Enable EF Core Migration in Full .NET Project (*.csproj)

I have a full .NET Framework project (*.csproj) with EF Core data access....How can I have migrations enabled for EF Core in Non-.NET-Core projects (ASP.NET MVC5)?...I get the following error:...dotnet : No executable found matching command "dotnet-ef"
.net-core ef-migrations entity-framework-core
asked by Mohsen Afshin

Page 72 of 333
  • ««
  • «
  • …
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • …
  • »
  • »»

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!