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

How do I make a group of multi-select checkboxes in ASP.Net MVC with c# enum?

I need to make a set of checkboxes where a user can select 1 or more markets. I would normally use a set of boolean values to accomplish this as it would be pretty strait forward and in my mind not take up much space in the database or take that long to l...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by Bob

Generic Repository EntityFramework 6 Implementation

I have been assigned a new project and I have decided to give EF a go.In this project all I do is getting data there is no persistence.I have to implement some caching and that's it....Reading about Repository patterns I have found tons of code samples et...
entity-framework entity-framework-6
asked by user9969

Save detached entity in Entity Framework 6

I've read through LOTS of posts on saving a detached entity in Entity Framework. All of them seem to apply to older versions of Entity Framework. They reference methods such as ApplyCurrentValues and ChangeObjectState which do not seem to exist. On a whim...
c# entity-framework entity-framework-6
asked by KingOfHypocrites

EF6 Code First Pluralizing Tables Invalid Object Name

EF6 is pluralizing my Code First table names no matter what I do. I am getting the error that it can't find the pluralized table {"Invalid object name 'dbo.TestStats'."}. The table is singular in the DB as dbo.TestStat...I tried removing the convention by...
ef-code-first entity-framework entity-framework-6
asked by Shiloh

Problems using Entity Framework 6 and SQLite

I'm trying to use Entity Framework with SQLite. I had issues integrating it into my main application, so I started a little test from scratch, exactly following the directions on ...http://brice-lambson.blogspot.com/2012/10/entity-framework-on-sqlite.html...
.net c# entity-framework entity-framework-6 sqlite
asked by Xcelled

Unable to find the requested .Net Framework Data Provider. It may not be installed

This morning I suddenly got this exception when trying to add a custom migration step to our EF Code-first migrations:...The ADO.NET provider with invariant name '.NET Framework Data Provider for SQL Server' is either not registered in the machine or appl...
ef-code-first ef-migrations entity-framework entity-framework-6
asked by Jesper Lund Stocholm

Issue with many-to-many relationship + TPH inhertitance in Entity Framework 6

I am running into an issue with EF6, though I'm fairly sure that this applies to previous versions that support this type of mapping. I fear I know the answer to the question at hand, but I hope that I am doing something wrong, or there is a better workar...
c# entity-framework entity-framework-6 many-to-many table-per-hierarchy
asked by joelmdev

EF 6 database first: How to update stored procedures?

We are using ...Entity Framework 6.0.0... and use database first ...(like this)... to generate code from tables and stored procedures. This seems to work great, except that changes in stored procedures are not reflected when updating or refreshing the mo...
ef-database-first entity-framework entity-framework-6 stored-procedures visual-studio-2013
asked by Halvard

Six seconds warmup time for the first entity framework 6 nonquery

From my integration test:...// Act Stopwatch w = new Stopwatch(); w.Start(); userService.Create(userDTO); w.Stop(); public void Create(UserDTO userDTO) { var user = userDTO.ToEntity(); _context.Entry(user).State = EntityState.Added; _context...
entity-framework entity-framework-6
asked by Pascal

EF 6 - Cascade Delete on one to many without backreference

I have something like this:...public class Gadget { public int Id { get; set; } public string Name { get; set;} public int SuperHeroId { get; set; } } public class SuperHero { public int Id { get; set; } public virtual ICollection<Gadget> Gadge...
.net entity-framework entity-framework-6 entity-framework-mapping orm
asked by George Mauer

DbContext cached data

I read everywhere that the proper way to get fresh data from the database is to create a new instance of DbContext, and drop the existing. While this may be obvoius for some scenarios, I am finding difficulties to implement this in a more complex scenrari...
entity-framework entity-framework-6
asked by Goran

EF 6 IsRequired() allowing empty strings

In past projects with versions of EF5 and EF4, the IsRequired() fluent API method would thrown a DbEntityValidationException if the property was null or an empty string. In my current project utilizng EF6, The DBEntityValidationException is not thrown wh...
entity-framework entity-framework-6
asked by awolske

Multi-async in Entity Framework 6?

This is my code:...var banner = context.Banners.ToListAsync() var newsGroup = context.NewsGroups.ToListAsync() await Task.WhenAll(banner, newsGroup); ...But when i called the function from controller. It showed error...A second operation started on this c...
asynchronous entity-framework entity-framework-6
asked by An Hv

Trying to use migrations in a project other then the startup project results in error

Hi I am trying to take advantage of Entity Framework migrations but when I add this command:...PM> Add-Migration...cmdlet Add-Migration at command pipeline position 1...Supply values for the following parameters:...Name: CodeArtMigration...I get back this...
c# entity-framework entity-framework-6
asked by aleczandru

Foreign key issues in EF6 CF

Excuse me for being a noob with EF when it comes to code first. My problem is I don't want to add foreign key properties to the model and according to MSDN this presents no problem using the fluent API, however I can not figure out the correct use for my ...
c# ef-code-first ef-fluent-api entity-framework entity-framework-6
asked by weagle08

How to pre-compile my EF Views

Here is the story : I had a huge MVC 2 website using Entity Framework 4.0 and a few days ago, I decided to upgrade MVC 2 => MVC 4 and EF4 => EF6 and .NET Framework 4.5....I did that on a project containing about 150 controllers and more than 300 entities....
asp.net-mvc-4 entity-framework entity-framework-6
asked by Jean-Francois

EF6 - TPH foreign key mapping in derived classes using base class property

I am using Entity Framework 6.0.2 with an existing database in which tags are stored in a single table that looks like this:...Id...: int, primary key ...TagType...: string, determine the type of tag, either "usertag" or "movietag"...ItemId...: int, c...
c# entity-framework entity-framework-6 single-table-inheritance table-per-hierarchy
asked by Erik Schierboom

Entity Framework Seeding with Identity (Microsoft.Owin.Security) user

I have a class that seed the database which add 2 users with roles and custom fields. The problem I have is that it save the data in [dbo].[AspNetUsers] instead of [dbo].[IdentityUsers]. Both tables are created. When seeded, the data go into AspNetUser. W...
asp.net-identity asp.net-mvc entity-framework entity-framework-6
asked by Patrick Desjardins

Could not load type 'System.ComponentModel.DataAnnotations.DatabaseGeneratedOption' from assembly 'EntityFramework' error

I have an ASP.NET application which works fine using EntityFramework 4.3. I have it now use EntityFramework 6.0.2 instead. Now I am getting the error below at a line in the OnModelCreating code....Why am I getting this error? Why is it looking for Databas...
entity-framework entity-framework-6
asked by Tony_Henrich

Mapping a long data property to int in database

In all of the examples that I've seen use ...int32...s as the IDs. That's not always practical in production environments. Several of our databases have identity IDs that are in the realm of ...int64...s, so our practice is to always use ...long... for ou...
c# entity-framework entity-framework-6
asked by krillgar

Page 6 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
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!