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

What use as Database for developing asp.net vNext + Entity Framework 7 on OSX

I'm trying to set up my environment for developing asp.net vNext + Entity Framework 7 on my OSX....Apparently, there is no provider for MySQL neither PostgreSQL yet. Thus, what can be used as database for developing on OSX?...What you folks have been doin...
asp.net-core entity-framework-core macos mono
asked by Rogério R. Alcântara

T4 template for Code First Workflow of EntityFramework 6.1

I like to customize the T4 templates used by Entity Framework 6.1 in Code First workflow....I have 2 projects in my MVC app, one for Data Access (DAL) and other for Domain Entities (Model). I am using "Code First from database" Entity Data Model wizard i...
entity-framework entity-framework-6
asked by Sam

Difference between SavingChanges event vs SaveChanges override?

I've read multiple posts about how to implement an audit log using entity framework. I currently have the audit logic embedded in the ...SaveChanges... method in the ...DbContext.... Please keep in mind that the code below is an EF4/5 implementation and I...
c# entity-framework entity-framework-6
asked by Eris

Entity Framework left join on multiple tables creates inner join instead

I'm trying to create a query that joins four tables together, only one of which is guaranteed to exist. I've been successful creating left joins in EF before, but never with more than one join. Here is the query:... var details = (from planInfo in conte...
c# entity-framework entity-framework-6 linq
asked by kindwarrior

Could EntityState.Modified cause Insert operation to be performed

I am reading the following tutorial about entity framework 6 ...Link.... And inside the section named ”Adding an Edit Page for Instructors”, the author wrote the following code inside the Post edit action method:-...[HttpPost, ActionName("Edit")] [Val...
ado.net asp.net-mvc c# entity-framework entity-framework-6
asked by john Gu

DataAnnotation Atributes not applied in EF7

When i migrate a database using k ef migration add bla bla. command the data annotation attributes are not reflected to the created database...e.g. iam using the [MaxLength(2)] attribute and am getting a column with data type nvarchar(MAX) created ...Any ...
database-migration entity-framework-core
asked by user380797

Entity Framework 6 Navigation property alias?

I have these two classes:...public class Foo { [Key] public int Id { get; set; } public string Name { get; set; } // ... // Foo has N bars, 1 of which is primary [ForeignKey("Bar")] public int? PrimaryBarId { get; set; } p...
c# entity-framework entity-framework-6
asked by RobIII

EF SqlQuery with navigation properties

I want call sp in t-sql from EF 6. At the same time i want load data to navigation property. On sql server side my SP Joins 2 table and returns. But EF side dont bind navigation properties....My query code loads car data but when i want reach Engine.Name ...
c# entity-framework entity-framework-6 navigation-properties sql-server
asked by user1924375

IEquatable breaks loading of Entity Framework entities

I want to compare records to see if there are differences between them....Person... table:...ID Name Address -------------------------------- 1 John Smith 123 A Street 2 John Smith 123 A Street 3 John Smith 234 B Street ..
c# entity-framework entity-framework-6 equality iequatable
asked by Shoe

Unique constraint entity framework

I'm using MS SQL Server 2012 + the Entity Framework 6.1.1. I have created a model using the designer. Now, I would like to add a unique to an attribute. How can I achieve this using the designer / keep the model generation?...Edit: I do the model first ap...
c# entity-framework entity-framework-6 visual-studio-2013
asked by mitchkman

Passing Context object between Repository, Generic repository & unit of work

I am working on an asp.net mvc web application & entity framework 6. i want to have these inside my application:-...Generic repository class....Dedicated repository class for each entity type. Where this dedicated repository will be derived from the gener...
asp.net-mvc entity-framework entity-framework-6 repository unit-of-work
asked by john Gu

Entity Framework : Sharing entities across different DbContexts

I'm developing a plugin application with EF6, code first....I have one main context with an entity called ...User...:...public class MainDataContext : DbContext { public MainDataContext(): base("MainDataContextCS") {} public DbSet<User> Users { ge...
ef-code-first ef-migrations entity-framework entity-framework-6
asked by tggm

How to use Bulk Insert in Entity Framework using Object Context?

I would like to use Object Context instead of DbContext to call Bulk Insert in Entity Framework 6. How can I do that?...I would like to do something like...readonly ...ObjectContext obContext...:...public void BulkInsert<T>(IEnumerable<T> items) where T :...
asp.net-mvc c# entity-framework entity-framework-6 linq-to-entities
asked by user3661657

Entity Framework 6: Multicolumn unique index featuring navigation property

How can I set multicolumn index on model like that:...public class Meta { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key] public Guid Id { get; set; } [Index("MetaPeriodDateUnq", IsUnique = true, Order = 2)] [Required] ...
c# entity-framework entity-framework-6 sql sql-server-2008
asked by Sergey Prytkov

Entity Framework Code First Fluent API configuration for one to one identifying relationship

I have the following class structure:...How to configure Fluent API to put identifying relationship in Cards table? ...I mean ...Cards Table PK: Id, CustomerId...Cards Table FK: CustomerId...I would like the previous Card be deleted when I assign a new on...
c# code-first ef-fluent-api entity-framework entity-framework-6
asked by Dmitry Nogin

Table 'DBNAME.dbo.TableNAME' doesn't exist Entity Framework 6 with MySQL

I am using Entity Framework 6.0.0 with MySql Server 5.6.17...I have added MySql.Data.Entities through nuget and it installed Entity Framework 6.0.0 and MySql.Data 6.8.4...Everything was setup perfectly and working fine with some of my Business Entities. i...
c# entity-framework entity-framework-6 mysql
asked by Arjun Vachhani

EF: Should I explicitly close database connection when calling OpenConnection manually

I open connection in constructor. Consider this code:...public abstract class DataContext : DbContext, IDataContext { static DataContext() { if (DataContextConfiguration.UseSafePersian) { DbInterception.Add(new SafePers...
c# entity-framework entity-framework-6
asked by user1968030

Entity Framework Change Primary Key Type

I'm using EF 6.0 Code First, and I have this entity: ... public class TrainingRespect { [Key] public int RespectId { get; set; } public DateTime? DateWhenRespected { get; set; } #region public string UserId { get; set; } public...
c# entity-framework entity-framework-6
asked by hyperN

EF -- Unable to determine the principal end of an association between the types

I'm having trouble working out what I am doing wrong here. I'm using asp.net Identity and I have created a new entity called ...Person.... I updated the ...ApplicationUser... Class to have a reference to the ...Person.... I wanted to create a navigation p...
asp.net-mvc c# entity-framework entity-framework-6
asked by user3836415

Add discriminator column as a part of a unique index in Entity Framework

Is it possible using EF Fluent API to configure a Discriminator column and another string column to be part of a unique index constraint?...I have a list of identifiers, where the identifiers can be of different types. Each identifier has a property of ty...
c# entity-framework entity-framework-6 sql-server
asked by honk

Page 23 of 333
  • ««
  • «
  • …
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • …
  • »
  • »»

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!