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

How to show the message (50 of 1000 items loaded) on the UIusing Entity Framework 6 when record is fetched for the first time?

The problem is when I am loading all the records at a same time it is taking a lot of time (more than 20 seconds) which is bad user experience. So, I am planning to fetch the 50 records but display the message "50 of 1000 items loaded" for the first time....
c# entity-framework entity-framework-6
asked by Bijay Yadav

Problem with relations beetwen entity models

I want to make a Like and Dislike system in my project , I have a model for User, a model for Post, a model for Comment with relations below:...User 1 ---> * Post...User 1 ---> * Comment...Post 1 ---> * Comment...now I want to add a new model called Like ...
asp.net-mvc c# ef-code-first entity-framework-6
asked by Reza Kargar

How can I avoid duplicate rows in foreign table with EF Code First

In my application, ...Movies... are stored in a DB. These ...Movies... have a ...Name... and a ...Director.......It is well known that any person with the same ...Name... as an other person is the same person. I would like to implement this constraint in ...
c# entity-framework entity-framework-6 sql-server
asked by Maxime

Entity Framework not cascade deleting

In short EF default is to delete cascade. I have a parent/child relationship I set up using Entity Developer by Devart. It is set to delete cascade. The parent table looks like this:...CREATE TABLE `Tools` ( `ToolNumber` TEXT, `ToolID` INTEGER PRIMA...
c# devart entity-framework-6
asked by Eric Snyder

How to improve performance of ordering list multiple times after getting data from database

I have just ran into issues with very slow performance of ordering the list. After running a query to database, I get the result and need to order it 4 times before it meets the requirements. The query runs pretty fast and I get all the results almost imm...
c# entity-framework entity-framework-6 linq performance
asked by Edward

Pass reflected property to .HasKey() using lambda expression

I want to have a flexible Entity DbContext in a way that I can put my database-first schema in a single nested class. This poc below actually works if each table has a column named Id, acting as the primary key. But if the primary key is different, I need...
c# ef-fluent-api entity-framework-6 lambda
asked by nl-x

Entity Framework 6, Command Interception & Stored Procedures

I was asked to develop auditing for a system at my work. The system has already been completed. I think EF 6's Command Interception should work well for my purposes....However, there are situations like this where we would want to know who sent a request...
c# entity-framework-6 sql sql-server
asked by Igavshne

How to best avoid checking user data (payments, license status) on every action every single time?

When a user logs in to our website, there are some things we wish to check:...Did they verify their e-mail address yet?...Do they currently have a license with us, or is their license expired and do they need to obtain a new one?...If they have a license,...
asp.net-mvc entity-framework-6
asked by Diana Koenraadt

EF 6 Code-First Many to Many relationship with same entity on non-primary key

I have an EF 6 Task entity, which looks like this:...public class Task { public Guid TaskId {get; set;} public TaskTypeEnum TaskType {get; set;} public TaskStatusEnum TaskStatus {get; set;} public virtual ICollection<Task> Dependencies {g...
.net c# database entity-framework entity-framework-6
asked by user3802230

Is there a way to log traffic to and from SQL Server Browser?

Something strange is happening with a database server I had to rebuild and restore from backup....I'm pointing an old VB6 application using ADODB.Connection and a modern C# EF6 application at it, using what should be the same connection string for both, o...
database-connection entity-framework-6 sql-server
asked by Glazius

Post request to database associated with primary and foreign key in web api using Entity Framework

I have a database with three tables with primary and foreign key association ....I am using Web API and Entity Framework to auto generate methods. I have been successful doing that. But I want to insert into a table with foreign key separately....Current...
asp.net-web-api asp.net-web-api2 asp.net-web-api-routing entity-framework-6 post
asked by Ayushi Gupta

How do I create an Entity Framework DbSet with data from 2 tables

Before I start my question, I will point out that this is for an assignment in a programming course I am doing, and I'm afraid the code needs to be in VB....Scenario: We are writing an app to help manage a veterinary clinic. There is a legacy MySQL databa...
entity-framework entity-framework-6 vb.net
asked by Steve Teece

Entity Framework doesn't create Context and table classes(.cs) from Entity Data Model (from existing database) in MVC

I have an ASP.Net MVC Project and Existing database.When I add new item -> ADO.Net Entity Data Model, it gives me the model (Model1.edmx including 4 files in it ...Model1.Context.tt...,...Model1.Designer.cs...,...Model1.edmx.diagram...,...Model1.tt...) bu...
asp.net-mvc c# entity-framework-6
asked by Semih

Entity Framework 6, validation not working as intended

I have a following piece of code... var newPost = new Post() { Activity = new Activity { Type = 1, ActivityTotalStatistic = new ActivityTotalStatistic() }, CreatedDate = oldPost.DateTimeCreated, ...
c# entity-framework entity-framework-6
asked by Robert

How to fetch records from more than 10 tables and shows the report out of them using Entity Framework 6?

Implementation contains the below things:...Fetch ...List<id>... from a table. This tables contains the records for which report should be generated. If this table has no records then report won't be generated....Rest of details are inline in the code....
c# entity-framework-6
asked by Bijay Yadav

How to show one by one record on the UI returning from the Web API?

Just for information:...I can not use the pagination (skip, take) since the records are coming from the multiple tables. For detail you can check the ...Report... model....I have to tried to get the data ...one by one... on the UI from WebAPI....The below...
ajax angular c# entity-framework-6
asked by Bijay Yadav

Remove cascade on delete from a single path

Follwing my data models. I stripped all the unimportant annotations to keep it short and clean....public class Bubble { public int Id { get; set; } public string Name { get; set; } public ICollection<Level> Levels { get; set; } } public class...
asp.net asp.net-mvc c# entity-framework entity-framework-6
asked by TheGame402

Publish to azure - turn off scheme update is terminating because data loss could occur

I am using EF6 code first, with automatic migrations disabled. All is fine on my local PC, but when I publish from Visual Studio to Azure I get the error message telling me that the schema update is terminating because data loss might occur. ...I know t...
azure entity-framework entity-framework-6 visual-studio visual-studio-2017
asked by Dan Faber

Fluent API relationships: one to one or zero relationsip

I have two tables ...Cargo... and ...CargoMovement... as follows:...public class Cargo { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int CargoID { get; set; } public string description { get; set; } public...
.net ef-code-first entity-framework entity-framework-6 linq
asked by SamuraiJack

Only allow self reference to a model that has a reference to the same owner

I have the following data model:...public class Bubble { public int Id { get; set; } public string Name { get; set; } public ICollection <Level> Children { get; set; } } public class Level { public int Id { get; set; } public int Bub...
c# entity-framework entity-framework-6
asked by TheGame402

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

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!