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)

6642 results for:

How to ask the database server for current datetime using entity framework?

I have an entity with a ModifiedDateTime property which I want to be updated with the current datetime from the database instead of the "application" server executing the application....Every time I want to update or add a person to my datebase on SQL Ser...
entity-framework entity-framework-4 entity-framework-6
asked by Levelbit

Check if there are any pending changes to be saved

Is there a way to find out whether there are unsaved changes in my entity context, in the Entity Framework?
entity-framework entity-framework-4 entity-framework-5 entity-framework-6
asked by Palantir

Table-per-type inheritance with EF 4.1 Fluent Code First

I have a pretty straight forward set of database tables, like:...Vehicle Id RegNo Car Id (FK of Vehicle.Id) OtherStuff Bike Id (FK of Vehicle.Id) MoreStuff ...My class model is as you'd expect: with Vehicle being an abstract class, and then Car an...
entity-framework entity-framework-4 entity-framework-4.1 entity-framework-6 table-per-type
asked by nbevans

EF code-first: How to load related data (parent-child-grandchild)?

I have this entity:...public class DynamicPage { public int PageId { get; set; } public int Order { get; set; } public string MenuText { get; set; } public string MenuHover { get; set; } public int? ParentId { get; set; } pub...
ef-code-first entity-framework entity-framework-4.1 entity-framework-5 entity-framework-6
asked by ravy amiry

async-await issue in EF 6

I'm trying async-await programming with entity-framework 6 (code first) + WPF and I can't see why the UI still freezes after I made the code asynchronous. Here is what I'm doing from the very first line:...first there is an event handler responding to a c...
async-await entity-framework entity-framework-6 wpf
asked by Vahid

Entity Framework 6 Code First Migration's ContextKey

Now i'm using EF6 Alpha, and when using migration, it will add a new migration log into the __MigrationHistory table....In EF6, The __MigrationHistory table has a new column called "ContextKey". After testing, I found there are two default "ContextKey" va...
entity-framework entity-framework-6
asked by RongieZeng

Can't update database using EF Migrations after updating to EF 6.0.0-alpha

After updating my Entity Framework to version 6.0.0-alpha1 I cant update database. This is the error I'm getting:...PM> update-database -verbose Using StartUp project 'DataCenter'. Using NuGet project 'DataCenter.Domain'. Specify the '-Verbose' flag to vi...
code-first ef-migrations entity-framework entity-framework-6
asked by Mahmoodvcs

Entity Framework 6: Right usage of "Custom Code First Conventions" Feature?

My requirement is configuing the string length mapping globally, but also can use MaxLengthAttribute to configue a property specially. Here's my code:...public class StringLengthConvention : IConfigurationConvention<PropertyInfo, StringPropertyConfigurati...
entity-framework entity-framework-6
asked by RongieZeng

Entity Framework Provider type could not be loaded?

I am trying to run my tests on TeamCity which is currently installed on my machine....System.InvalidOperationException...: ...The Entity Framework provider type '...System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer..., ...Ver...
c# entity-framework entity-framework-6 mstest teamcity-7.1
asked by ashutosh raina

EntityFramework 6 Alpha 2 & MySQL Connector/NET 6.6.4

The 6.6.4 MySQL .NET connector apparently has support for EF6. I've upgraded from EF5 and .NET 4 to EF6 alpha2 and .NET 4.5. I've recreated the ADO.NET Entity Data Model since upgrading....Upon doing anything to the database it throws up an exception mess...
entity-framework entity-framework-6 mysql mysql-connector
asked by pierce

Entity Framework 6 + SQLite

I'm trying to use EF6 alpha and SQLite 1.0.66.0...My .config file:...<connectionStrings> <add connectionString="data source=:memory:;" name="TestDbContext" providerName="System.Data.SQLite" /> </connectionStrings> <entityFramework> <providers> ...
ado.net entity-framework entity-framework-6 sqlite
asked by nmulyukin

How to get original Entity from ChangeTracker

Is there a way to get the original Entity itself from the ...ChangeTracker... (rather than just the original values)?...If the ...State... is ...Modified..., then I suppose I could do this:...// Get the DbEntityEntry from the DbContext.ChangeTracker... /...
.net c# entity-framework entity-framework-6
asked by Eric

EF6 alpha Async Await on an Entity Stored Procedure / Function Import?

I'd like to apply the new async await functionality to Stored Procedures / Function Imports imported in my Entity model, but have as yet been unable to with the EF6 alpha....Is it yet possible in EF6 alpha2 (or the nightly build as of 20211) to call any o...
async-await c#-5.0 entity-framework entity-framework-6
asked by blueFish

Error deploying to SQL Azure using EF 6 alpha3 Code First and Migrations creating __MigrationHistory table

I'm using EF 6 alpha 3 code first. When I try to create the database on SQL Azure running the Update-Database command I get the following error:...Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered ...
azure-sql-database entity-framework entity-framework-6
asked by Bruno Moscão

Entity Framework and Migration with multiple schemas in a single Context

I am developing a multi-tenant application with Entity Framework Code First. Each tenant will have a different schema in the database, but the application will have a single Context and model for all tenants. ...The Entity Framwork 6 is able to use multi...
c# ef-code-first entity-framework entity-framework-6
asked by Bruno Albano de Souza

Entity Framework 6 Custom Relationship Convention

I have read ...this... documentation about convention in Entity Framework 6. But it does not contain convention for Relationship. ...Suppose I have following model:...[TablePrefix("mst")] public class Guru { public int Id { get; set; } public int...
c# entity-framework entity-framework-6
asked by Niyoko Yuliawan

Is there an planned release date for Entity Framework 6?

My question says it all, but here's some background:...Due to various constraints I'm stuck on .NET 4.0 until at least July 2014. However, I'm tasked with converting our DAL to use Entity Framework for help with scalability and performance. Currently we...
entity-framework entity-framework-6
asked by Kim

How do I remove underscore of foreign key fields in code first by convention

I've got multiple classes (including TPT) in my project. Each POCO has a ...BaseClass..., which has a ...GUID... (called ...GlobalKey...) as primary key....First I used ...DataAnnotations... to create correct foreign keys. But then I've got problems synch...
code-first entity-framework entity-framework-6 naming-conventions
asked by Andreas Geier

Connecting to SQL Server with EF6

Up to EF5, in order to connect to SQL Server 2012, all I needed to to is specify a connection string that looks something like this:...Data Source=.\SqlExpress;Initial Catalog=MyDatabase;Integrated security=True;MultipleActiveResultSets=True ...This metho...
entity-framework entity-framework-6
asked by Goran

Error "Failed to set database initializer of type MyNamespace.MyCustomInitializer, MyAssembly" could not load MyContext type

I'm creating a web app using .NET4.5 with Entity Framework 6 alpha3 that uses a new SQL Compact database. The database does not yet exist....I have the following code in a web form:...public IQueryable<Job> listJobs_GetData() { var db = new Journalist...
entity-framework entity-framework-6 webforms
asked by Mark Shaw

Page 1 of 333
  • 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