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

Could not load file or assembly 'System.Memory, Version=4.0.1.' in Visual Studio 2015

For a couple of months i had no issue about generating the model from DB by deleting it and recreating it . After a pull from git, an issue has been occurred while trying to make the same process . After the second step (connection string creation with DB...
.net c# entity-framework-6 npgsql visual-studio-2015
asked by Prometheus

Entity Framework 6 not updating from database correctly in VS 2019

I'm working on a .NET MVC web app using Entity Framework 6 to manage a model from a SQL Server database. I've been using VS 2017 to develop everything so far, making changes to the database, and updating the model after those changes are made. When I swit...
entity-framework-6 visual-studio-2019
asked by jbrown7061

How to fix 'CREATE SCHEMA' failed error when running EF Code First migrations with Azure Managed Identity

I am trying to run EF6 Code First migrations against an Azure SQL database connecting via Azure Managed Identity. There are several migrations to run. The last migration fails. This migration is different to the others because it creates tables in a new s...
azure-sql-database ef-migrations entity-framework entity-framework-6
asked by user1857450

Excluding properties from update instead of updating whole object

I am using ASP.NET Boilerplate with Code-First Entity Framework 6 and MVC 5....In order to update an entity, I am using ...UpdateAsync.......How can I exclude some properties from the entity before executing update?...What function should I use and is thi...
asp.net-mvc-5 aspnetboilerplate c# change-tracking entity-framework-6
asked by oula alshiekh

EntityFramework - virtual ICollection query

I have entities like this:...public class Student { public int StudentId { get; set; } public string StudentName { get; set; } //Foreign key for Standard public int StandardId { get; set; } public virtual Standard Standard { get; set;...
c# entity-framework entity-framework-6 sql
asked by Raghavendra

Unable to create a constant value of type 'System.Tuple

I am trying to implement c# linq expression that will allow me to extract data based on years and months.The error is thrown in the where method of my context....I am currently getting the error...System.NotSupportedException: 'Unable to create a constant...
c# entity-framework entity-framework-6 linq
asked by Tom

EF6 Schema compare between database and sql-file?

I use EF6 model-first approach to design MS SQL database by using "Generate database from model..." in Visual Studio. This generates a sql-file with all drop and create statements....At some productive stage where the database is filled with records, I do...
ef-migrations entity-framework entity-framework-6 sql sql-server
asked by mrt

DBcontext is getting shared while being registered as Scoped

I am trying to migrate from ef6 to ef core and started getting below problems ...System.InvalidOperationException: 'A second operation started on this context before a previous operation completed. This is usually caused by different threads using the sam...
asp.net-core c# ef-core-2.2 entity-framework-6
asked by Dheeraj Kumar

Entity Framework 6 A dependent property in a ReferentialConstraint is mapped to a store-generated column. Error

I have 2 entities configured using Entity Framework 6. Both entities have Identity on for generating primary keys on insert. ...When i try adding new customer I get following error. ... A dependent property in a ReferentialConstraint is mapped to a stor...
entity-framework entity-framework-6
asked by kkdeveloper7

How to fix FirstOrDefault returning Null in Linq

My Linq Query keeps returning the null error on FirstOrDefault ...The cast to value type 'System.Int32' failed because the materialized value is null ...because it can't find any records to match on the ClinicalAssetID form the ClinicalReading Table, fai...
entity-framework entity-framework-6 linq
asked by microchef

Using multiple SQL statements in EF migration - how to use GO to run in SSMS?

I am renaming some columns using EF6 migrations, and need to update several functions, views and stored procedures which use the columns. I want to add these as separate ...Sql()... calls within different private methods so the overall migration is easier...
ef-migrations entity-framework-6 sql-server
asked by Tim

ASP.Net Select a Dropdown option (in View) based on a value returned by EF model

For a Dropdown (as a SelectList) in my View, I can successfully set the value to the Id returned by my model, but the list does not update to reflect the selected Id as the selected item. ...<%var type = Model.CompanyTypeId; %> <%= Html.DropDownList("Type...
asp.net-mvc-5 c# entity-framework-6
asked by William Howell

TransactionScope needs DTC enabled in C# MVC

We are using RDS (Amazon Relational Database Service) for our db . we have some sp s which called in a transactionScope. we ahve Customized ExecutionStrategy for our DBConfig like this ...public class MpDbConfiguration : DbConfiguration { publ...
.net entity-framework-6 msdtc transactions transactionscope
asked by Sara N

How do I publish an application with Entity Framework?

I have an application I was tasked with creating for a school project and one of the requirements was that it should be able to communicate with a Microsoft SQL Server database using Entity Framework 6. ...I'm done developing the app, but when I click on ...
c# entity-framework-6 visual-studio
asked by user8767324

EntityFramework Database.ExecuteSqlCommandAsync ReturnValue Not working

using MVC 5, EF6 and c#... I have a stored procedure that accepts an input and returns a Value of 1 .(Simplified for Example) Strange part is that when I try to declare the Return value as ParameterDirection.Return Value I get an Error of ...Must Declar...
c# entity-framework-6 stored-procedures
asked by Joe Ricklefs

EF6 Add-Migration in PowerShell, outside Visual Studio

How can I run the EF6 ...Add-Migration... outside Visual Studio, in a PowerShell window?...When I try to run it, there is this error message:...Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or o...
ef-migrations entity-framework-6 powershell
asked by nvirth

Cannot convert from system.data.common.dbconnection to system.data,sqlconnection

I am importing data from my excel file to sql database. I am using MVC 5 and entity framework 6. I am using epplus to import the data and sqlbulkcopy to import the data to sql. I am getting 3 errors: 1) excelImportDBEntities.Database.Connection 2) sqlbulk...
asp.net-mvc-5 c# entity-framework-6 epplus sqlbulkcopy
asked by Minhal

SQL Server to .Net Decimals with EF6 dDatabase first issue

I'm currently reading data from a SQL Server stored procedure and it is returned as ...Decimal(38, 20).......I know that the .Net decimal is ...(28, 10)..., but the model classes generated for this by EF are showing ...Decimal?.... When I query the table,...
c# entity-framework entity-framework-6 sql-server
asked by Joe Ricklefs

Getting SQL queries generated with Entity Framework Plus?

I am enjoying the features of ...Entity Framework Plus... over Entity Framework 6 since a few hours, and especially its ...IncludeFilter.... ...With regular Entity Framework 6, I was able to simply call ToString() on an IQueryable to easily get the SELECT...
entity-framework-6 entity-framework-plus
asked by AFract

"Implicit conversion from data type nvarchar(max) to varbinary is not allowed" error when storing data using EF6

I have two model classes - both have a ...byte[]... field for storing a PDF file....In the database the two model classes correspond to two tables - both with a ...varbinary(max)... column....For the one model class, I can easily persist to SQL Server, ho...
asp.net-mvc-4 c# entity-framework-6 sql-server
asked by sorenchristensen

Page 336 of 347
  • ««
  • «
  • …
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • …
  • »
  • »»

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!