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 add a where clause to Entity Framework query

I have been trying to figure out how to add a ...Where... clause to this. I need ...Where OrderHeader.OrderStatus = "NEW" ...Any help is a appreciated. ...using (context) { var orderData = context.OrderHeaders .Join(conte...
asp.net asp.net-core c# entity-framework-6
asked by Ryan

Entity Framework: How to optimize this below linq query?

I need some suggestions that how to improve this below query....from o in this.DbContext.Set<School>().AsNoTracking() from s in o.Teachers.DefaultIfEmpty() where SchoolCodes.Contains(o.Code) select new TabularItem { SchoolId = o.Id, SchoolCode = o...
.net c# entity-framework-6 linq performance
asked by viswa teja nudurupati

Could not get Data from SQL Server using Stored Procedure

I cannot get values from database using stored procedure. Please see code below:...class LaneModel { public string Name { get; set; } public int Lane { get; set; } public int ManualCount { get; set; } public int ReadCount { get; set; } ...
c# entity-framework-6
asked by Ibanez1408

What is the ProviderManifestToken value for Oracle.ManagedDataAccess 19.3?

Just installed ODAC for Visual Studio 2017 version 19.3 from here: ...https://www.oracle.com/database/technologies/dotnet-odacmsi-vs2017-downloads.html... to replace ODT for Visual Studio 2017 NuGet Package. Then I noticed my Oracle NuGet packages were go...
edmx entity-framework-6 oracle visual-studio-2017
asked by Debbie A

Resolving connection string in EFv6.3 in ASP.NET Core Windows service project

I have an ASP.NET Core application running as a Windows Service. Due to project requirements, I am using Entity Framework v6.3 (as opposed to using EF Core). ...I am having trouble retrieving the correct connection string when performing a migration. ...A...
asp.net-core entity-framework entity-framework-6
asked by Ciaran Gallagher

How to use Azure function V3 with Entity Framework 6 (exception System.Data.SqlClient: System.Data.SqlClient is not supported on this platform)?

I have an Azure V3 app that must call DAL repos built on Entity Framework 6.4 On database initialize I am getting an exception: ...System.Data.SqlClient: System.Data.SqlClient is not supported on this platform...That is coming from: ...System.Data.SqlClie...
.net-core azure-functions entity-framework-6
asked by Sergejs

Entity Framework: Improving Performance when inserting a record in a table with many records

I want to insert a single record into a table with 60 columns (some of them are not required) and 2 million records. It takes about 20 seconds....var package = new Package() { DestinationCityId = city.Id, OriginCityId = RequestDe...
.net asp.net-web-api c# entity-framework-6 sql-server
asked by Miremad Bagheri

Need day of week as string (Sunday, Monday ...) in Queryable where clause

I need to check whether the provided keyword is present in the day-name of a date in the db. I have done it by using dynamic query....ArrayList paramList = new ArrayList(); int paramCount = 0; StringBuilder queryString = new StringBuilder(); if (keyword ...
c# dynamic-linq entity-framework-6 sql-server
asked by Amrendra

Why EF6 LINQ does not generate proper "is null" SQL for null string variable comparison?

We have an EDMX-based EF6 application, where we'd like to run a LINQ query like this....string category = ... // comes from somewhere and equals to null context.Product.Where(e => e.Category == category).ToArray(); ...The problem I see is that the generat...
c# entity-framework-6 linq-to-entities
asked by Zoltán Tamási

Unsure on how to access Include data in C# Linq

Evening all, I was hoping that someone could help me along with a project that I am working on....Just before I really start, I just want to make it absolutely clear, I have never done anything like this before past dabbling at home, I am not a C# develo...
c# entity-framework-6 linq
asked by LCHolmes

Entity Framework: Unable to call .OrderBy on calculated field IQueryable

I am currently struggling to figure out how I can order a query by a field that only has a getter. I have an ...IQueryable... being built as follows:...var referrals = db.Referrals .Include(x => x.Doctor) .I...
asp.net asp.net-mvc c# entity-framework entity-framework-6
asked by GregH

How can I fix "The ObjectContext instance has been disposed "

I developed an application with entity framework. I get the ...The ObjectContext instance has been disposed and can no longer be used for operations that require a connection....error from sometimes....I did some research on the internet but I couldn't ...
asp.net asp.net-mvc-4 entity entity-framework entity-framework-6
asked by Engin Ozsozgun

ASP.NET Entity Framework request SQL

I need to write this SQL statement in Entity Framework:...SELECT SALARIE.MATRICULE, LIEU, UO, UO_RATTACHEMENT, PHOTO.PHOTO, SALARIE.NOM, SALARIE.PRENOM FROM SALARIE, UNITE_ORG, PHOTO WHERE SALARIE.LIEU = UNITE_ORG.UO ...I use this metho...
asp.net asp.net-mvc entity-framework entity-framework-6 sql-server
asked by Oumaima El Kouira

EF6 -> EFCore ExecuteSqlCommand equivelant

I'm working to move our model over to EF Core and I'm having trouble finding a way to call the following code:...InitializeTime = context.ExecuteSqlCommand<DateTime>("SELECT CURRENT_TIMESTAMP FROM DUAL").FirstOrDefault(); ...We use the database time to sy...
c# entity-framework entity-framework-6 entity-framework-core oracle11g
asked by Felix Castor

LINQ Include a child array of select

I have the following LINQ query which is working great :...public IList<Course> GetEmployeeCourses(int id) { var employeeCourses = Context.Employees .Where(e => e.Id == id) .SelectMany(e => e.employeeCourses.Select(ec => ec.Course)) .ToList(...
c# entity-framework-6 linq
asked by DBoi

Entity Framework not tracking List

I'm using EF6 with ASP.Net. I'm trying to add items to the Jobs list in the following model:...EDIT: ...My goal is to save the changes I make to the Timecards.Jobs list through a PUT method in such a way that I can retrieve them through a GET method....pu...
asp.net asp.net-mvc entity-framework entity-framework-6 orm
asked by Kelly VM

Is there a way to prevent Entity Framework to NEVER read entries where a property is a specific value?

I have a software that has been in the works for a while, today our client decided we NOT delete any data but instead hide them. To do this, I plan to add an "isDeleted" property to all tables and change all methods for deletion to set this property to "t...
c# entity-framework-6
asked by Tolga Açış

How to select records with MAX Id that group by multiple columns in LINQ to SQL

I need to select the last record of particular columns. I have the following records...WarehouseId | ItemId | SubItemId | DeliveryGroupId | Other Columns 1 | 1 | 1 | 1 | ... 1 | 1 | 1 | ...
c# entity-framework-6 linq-to-sql
asked by Sam

Update-database problem in asp.net MVC application

When i update database in package manager console i have this error...Introducing FOREIGN KEY constraint 'FK_dbo.Appointments_dbo.Users_AppointmentManagerId' on table 'Appointments' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION o...
asp.net asp.net-mvc entity-framework-6 migration
asked by zied ben othman

One to One HasRequired configuration not working

I have two sets of objects: ...Coupon... and ...DiscountScheme....... Each have a connected object of ...{Type}Action..., and identical configurations.... When making a request for ...Coupon..., I do not get anything back, but the same query for ...Discou...
c# entity-framework entity-framework-6
asked by Mord Zuber

Page 344 of 347
  • ««
  • «
  • …
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • »

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!