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

Can we attach more than one object in entity framework and do savechanges once

I am using ...Visual Studio 2012... and ...Entity Framework 6.0... and I am doing some ...CRUD... operation but I have some challenge to face now that....I am doing multiple entries in one form and want to update or save those details at once so I am doin...
c# entity-framework entity-framework-6 updates
asked by 3 rules

EF Core FromSQL query does not get executed immediately (PostgreSQL)

I have written a function in PostgreSQL for insertion as follows:...CREATE OR REPLACE FUNCTION public.insert_blog("Url" character) RETURNS void AS $BODY$Begin Insert Into "Blogs"("Url") Values("Url"); End$BODY$ LANGUAGE plpgsql VOLATILE COST 100...
.net-core entity-framework-core function postgresql stored-procedures
asked by Amol Kolekar

Entity Framework Identity Column Negative Value

I have an ASP.NET Core 1.0 web application that implements some REST web services which interact with a PostgreSQL database via Entity Framework Core....In my model, I have a variety of code-first entity classes that utilize the following pattern:...[Key]...
asp.net-core entity-framework-core postgresql
asked by robbpriestley

Sequence contains more than one matching element on schema update

I´m using ef-core inheritance like this:...public abstract class Person { public int Id { get; set; } public string Name { get; set; } public PersonType PersonType { get; set; } public int PersonTypeId { get; set; } public double Heig...
asp.net-core entity-framework entity-framework-core inheritance
asked by Elmer Ortega

Drop database if model changes in EF Core without migrations

In previous version of entity framework, one could recreate the database if the model changes, using some of the classes DropDatabseIfModelChanges and other related classes. In EF7 or EF Core i don't know how to do that. Run the migrations some times giv...
asp.net-core c# ef-migrations entity-framework entity-framework-core
asked by Rey Cruz

How to enable migration in sqlite using ef

I have stuck in problem. I am writing a code for windows desktop application and I have to use sqlite as a database. I have successfully installed ...system.data.sqlite... and entity framework from nuget package. I have also created my DbContext class. No...
c# ef-code-first entity-framework-core sqlite
asked by habib

Entity Framework code-first, one-to-zero-to-one and one-to-many relationship to same entity

I'm creating a code-first database with v6.0 of the Entity Framework. I have an ...Organisation... class and a related ...Location... class defined in c# as follows:...public class Organisation { public int Id { get; set; } public string Name { ge...
c# code-first ef-code-first entity-framework entity-framework-6
asked by Mark Sizer

EF Core 1.0.0 chaining Where clauses

I have a piece of code that I'm trying to port from EF6 to EF core (in an ASP.NET core 1.0 RTM project). It filters the patients table for all patients with a datetime between the "Verpleegperiode" startdate and enddate and for example with a "Verpleegpe...
asp.net-core c# entity-framework entity-framework-core sql-server
asked by Appsum Solutions

Entity Framework Core - Mapping Raw Query(DTO Class without ID field) , Scalar

I am using EFCore with ASPNETCore, everything looks great, but I find these two situations:...I have created a DTO classes that are not tables in the database, these classes that will map a raw SQL query or procedure....So I need to map the results of an ...
c# dbcontext entity-framework entity-framework-core stored-procedures
asked by Jose Eduardo Poma Caceres

Entity Framework with MySql: Map System.Guid to VARCHAR(40)

I am using Entity Framework 6 code first to connect to a MySql database. I do not own the database. I ...cannot... change the database schema. I also cannot change to another flavor of Entity Framework (model or database first). ...I'm having trouble mapp...
c# ef-code-first entity-framework entity-framework-6 mysql
asked by inchcrest

EF core computed properties marked as readonly

Background: I'm overriding the SaveChanges() method to automatically generate a LastUpdatedDate whenever the "Item" entity is added or updated. ...Item.cs... [DatabaseGenerated(DatabaseGeneratedOption.Computed)] public DateTime? LastUpdated { get; set;...
c# entity-framework entity-framework-core
asked by proggrock

EntityFramework Core database first approach pluralizing table names

We have existing database with pluralized table names. For Example ...Documents.... I am trying to use new ...EF Core... and ...Asp.Net Core... with database first approach based on this article ...here...I run the following command to create models from ...
asp.net-core c# entity-framework-core
asked by LP13

Can dotnet-ef-dbcontext-scaffold ignore schemas?

We're working on a new ASP.Net Core application, and plan on using identity. Currently, we have 2 DbContext files, the ApplicationDbContext file which inherits from IdentityDbContext for the Identity functions, and our own ProjectDbContext for the rest of...
entity-framework-core scaffolding
asked by M Kenyon II

Entity Framework error: The field X is required

I have the following class: ...public class Foo { [Key] public int ID { get; set; } [Required] [StringLength(100)] public string Name { get; set; } [Required] public float Quantity { get; set; } ...
ef-code-first entity-framework entity-framework-6
asked by Ayorus

Sharding Strategies using Entity Framework Core

I'm developing a new REST API using Asp.Net Core and Entity Framework Core. We will be porting over data from a legacy system that uses horizontal database partitioning (sharding). I'm trying to think of a good way to handle this in EF Core. Our previous ...
.net .net-core asp.net-core entity-framework entity-framework-core
asked by Homr Zodyssey

Computed column in EF Core incorrect mapping

Trying to use a Computed column in my query but it seems EF Core handles it like any other column and just ignores the mapping. Is there somehting i do wrong here? or do i misunderstand the usage of the computed column :S This is almost the same examples ...
.net entity-framework entity-framework-core
asked by Lasse Vabe Rolstad

Child collection not updating in EntityFrameworkCore

Consider the following simplified models with nested one-too-many relationship:...public class Report { public Guid ReportId { get; set; } public string Name { get; set; } public List<Schedule> Schedules { get; set; } } public class Schedule ...
.net c# entity-framework-core uwp win-universal-app
asked by Hendra Anggrian

dotnet core on Ubuntu Linux using asp.net MVC and EF MySQL error NU1001: cannot restore MySql.Data.EntityFrameworkCore

I've built a simple, flat dotnet core MVC app that I'd like to see running on Linux. It uses EF to pull a few records from a mysql table and display them in a view. It all builds and runs on my host (Win10) but will not in the Ubuntu VM I've spun up to te...
asp.net-core entity-framework-core linux mysql ubuntu-server
asked by Tsar Bomba

How to add Data Validation in EF Core with Database First approach?

I am implementing a MVC-Webapplication with ASP.NET Core (RC2) and as ORM Entity Framework Core. Since I already got a database design, I have to create the entity models by the Scaffold-DBContext command....This works fine. Now, I want to add some annota...
c# ef-database-first entity-framework entity-framework-core validation
asked by user1885888

EntityFrameworkCore FromSql method call throws System.NotSupportedException

So am using AspNetCore 1.0 with EFCore 1.0, both latest releases as far as I am aware. ...Executing a query to delete an object using the FromSql method on a DbSet throws an exception. Both the code and exception are below....public void DeleteColumn(int ...
asp.net-mvc entity-framework entity-framework-core
asked by Foysal94

Page 77 of 333
  • ««
  • «
  • …
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • …
  • »
  • »»

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!