zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

6940 results

Entity framework 6, fluent mapping of 1 to 0..1 relationship on non-primary-key columns

I'm trying to migrate an objectcontext/edmx system to dbcontext (EF6) with fluent mapping. I have a few instances like the following. Principal table has a relationship to a dependent table where a non-PK column in the dependent table holds the value of a...
dbcontext entity-framework-6
asked by Kevin O'Donovan

Why "Skip" and "Take" is taking longer time when the record being fetched is getting more and more?

There is more than ...50,000 records... in the table. I am using ...Microsoft SQL Server 2016 (RTM-GDR).......I have used the code to fetch 200 records at a time. The below code seems to work fine till 1000 records but after that it starts taking longer t...
c# entity-framework entity-framework-6
asked by Bijay Yadav

Entity Framework 6 BulkInsert receiving an invalid column length from the client SQL SERVER 2012 Express

I have a little problem with Entity Framework 6....My application is a WPF C# application, I use SQL SERVER 2012 Express....I try to insert data into my Person table....It was working for a long time. Today I had an error : receiving an invalid column len...
c# entity-framework-6 sql-server-2012-express
asked by Coskun Ozogul

ASP.NET MVC 4 API's endpoint not responding

I am new to ASP.NET MVC4 and I have an issue I can't manage to resolve....I have a simple GET endpoint which I want to return all the ...prestations.......When I try to reach this endpoint, I get no response and not even a timeout. My API is working well ...
asp.net-mvc-4 c# entity-framework-6
asked by Pierrick Martellière

Getting Sql Error: Invalid column name 'PrimaryContact_ContactID'

Will someone please put me out of my misery and let me know what I have/have not done that makes my code fail?...I am using Entity Framework database first. When I query for an entity and request a related entity to be included, I get this error: Invali...
c# entity-framework-6
asked by Chris Dunaway

EntityFramework DbContext in static method per request

How Entity Framework ...DbContext... works in static method per web request? is there any performance issue? I have 2 classes below . Which one is better to use ? or bad? Do we need get instance all pear request ? is there any issue?...public class MyClas...
asp.net-core-mvc asp.net-core-webapi asp.net-mvc dbcontext entity-framework-6
asked by DotnetGirl

Getting error while inserting department foreign key in Employee table

I am beginner to Entity Framework. I want to insert employees along with department as foreign key, but I am getting the following error while adding records:...The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_dbo.Employees_dbo.Departm...
entity-framework entity-framework-6
asked by Sandeep

How to use multiple tables with the same foreign key with Entity Framework

I need to define my 3 classes as follows:...public class Table1 { public Guid Table1CoreId {get;set;} public string Name {get;set;} public Table2 Table2 {get;set;} public Table3 Table3 {get;set;} } public class Table2 { Guid Table1CoreId ...
c# entity-framework entity-framework-6
asked by Thierry

web API 2 image upload with Object

I want to upload image with some properties value. I can do only upload image Here is my Image Upload code:... [HttpPost] [Route("UploadImage")] public async Task<HttpResponseMessage> ImageUpload() { // Check whether the POST operat...
asp.net-web-api c# entity-framework-6
asked by Ahasanul Banna

Plymorphic Many to Many relationships in EF

I have a polymorphic collection on one entity type that contains a collection of objects that are the child types of it. the child types are all stored in different tables in the db. ...I need to map this relationship in the fluent API so I can manage the...
c# entity-framework-6 entity-relationship polymorphism
asked by War

asp.net MVC 4 - How do I return less data for serialization?

I'm new to asp.net MVC4 and I have an issue with the serialization of an entire Dataset. ...When I return this Dataset, eg. ...db.Prestations.ToList()... and call my endpoint in Postman, the request takes much time and doesn't respond. ...If I put the res...
asp.net-mvc-4 c# entity-framework-6
asked by Pierrick Martellière

Exception when trying to use Mysql.Data.Entity

I'm trying to get a test project running using MySQL and EF6 using Visual Studio 2019 Community Preview for Mac. I am using the ...Web Application (Model-View-Controller)... / ....NET Core -> App... template as a starting point as well as the ...MyWind...
connector-net entity-framework-6 mono mysql xamarin
asked by Don 01001100

EF6 - Why do all my DbSets throw InvalidOperationException when enumerating them?

I am a bit baffled as to what I am missing in configurations or whatever that puts this rock in my way....What am I trying to do?... My original testcase was just to grab a collection, .ToList() it and then hand that to the API. Your pretty standard EF qu...
c# entity-framework entity-framework-6
asked by beggarboy

How Can I Display Foreign Key value in Csharp Datagrid and Entity Framework

I have my tables as session and semester. For every semester there is always a session which I linked using foreign key, however, my datagrid only displays the integer value of the foreign key, I have tried several answers online to solve this but still n...
c# datagrid entity-framework-6 foreign-keys winforms
asked by Akinniyi Bode Bolade

Error inserting data from many method return lists to a database in c#

I need help here with part of my code so here it is:...I have 6 methods as you can see below that parse incoming data and then returns it as a list, so my issue is to send that list data to my database table SerialNumber, each method of the lists is a sep...
arraylist c#-4.0 entity-framework-6 winforms
asked by NewCoder

Write this SQL query to Entity Framework lambda expression or other way

db.DbEnquiryModules... - how to write this query as a lambda expression or linq?...SELECT tenq.EnquiryID ,tenq.EnquiryNo ,tenq.CompanyID ,tenq.EnquiryDate ,tenq.ClientID ,tenq.Address ,tenq.ContactPerson ,tenq.Email ,...
c# entity-framework entity-framework-6 linq linq-to-sql
asked by user2561115

How to use Database.Migration() after Database.EnsureCreated() EF Xamarin.Forms

I was working on a ...Xamarin.Forms... application and using EF 6 targeting ....net standard 2.0.... The application is live on app store with my DBContext class as follows....public class DatabaseContext : DbContext { private readonly string _databas...
c# entity-framework-6 entity-framework-core xamarin.android xamarin.forms
asked by Mayank Shrivastava

Entity Framework 6 does not create the mapping tables

I am using an Entity Framework 6 ,I have some table as a mapping tables in the database - to map many to many tables - does not created as an entity when I create the model. what is the problem will be?...that's the tables:...Prop: PK-Code PropCh: PK-CHID...
c# entity-framework entity-framework-6 sql-server
asked by Rawan Mansour

Entity Framework query to get child items

I have order structure as below...Order 1234...Category 1...Item 111...Item 222...Category 7...Item 444...How can I modify the query below to include all items from order 1234...public List<Items> GetAllOrderItems(int orderId) { var result = (from o i...
c# entity-framework entity-framework-6 linq-to-entities
asked by mehwish

C# convert sql query into EF dbcontext linq to entities query

I have an sql server database and I use EF 6.0 to access it in my app....I have the following SQL Query I need to convert to dbcontext linq to entities query and have some damn hard time figure it out....This is the query:...select PA.Number, PA.Name, ...
c# entity-framework-6 linq linq-to-entities sql
asked by user2818430

Page 334 of 347
  • ««
  • «
  • …
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • …
  • »
  • »»

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
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!