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 define a navigation property via Entity Framework code first approach

I have the following class that I want to use as my data context in Entity Framework:... public class AggregateRecord : IAggregateRecord { [Key] public int AggregateRecordID { get; set; } public DateTime? InsertDate { get; s...
c# ef-code-first ef-code-first-mapping entity-framework entity-framework-6
asked by ck84vi

Why only primitive types or enumeration types are supported in this context using EF?

In my application I try to execute a ...Join... query using ...EntityFramework..., ...Repository Pattern..., It is throwing bellow error. What is the ...problem... in the ...link query...? Let me explain in details...Error Description...Unable to create a...
entity-framework entity-framework-6 join linq repository-pattern
asked by Shubhajyoti Ghosh

The store type 'Varchar(100)' could not be found in the SqlServer provider manifest

I am working on an MVC 4 project that use EF 6 for all operations to and from the Database (SQL Server). I had to do some refactoring to use a more explicit Fluent API. Basically, now every entity on the project has its corresponding Fluent API code for a...
asp.net-mvc c# entity-framework entity-framework-6 sql-server
asked by MikePR

Dynamics 365 (CRM) Version 9.1 online C# code Error: Entity Id must be the same as the value set in property bag

When cloning/copying child records, I use a foreach loop and then create a record with all its attributes. I wrote similar code in another project and worked fine for me....There are multiple articles/questions based on the same Error. Now my issue is how...
c# dynamics-crm dynamics-crm-online entity-framework entity-framework-6
asked by AnkUser

DbUpdateException when adding item to Entity Framework Context

I have the following two classes:...public class Record { public int RecordId { get; set; } public DateTime? InsertDate { get; set; } = DateTime.Now; public DateTime BookingDate { get; set; } public string AmountTypeName { get; set; } ...
c# constraints entity-framework entity-framework-6
asked by ck84vi

EF6. Make sure "System.Data.Entity.Properties.Resources.PowerShell.resources" was correctly embedded or linked into assembly "EntityFramework"

I have ASP.NET MVC project and use EF6 in it. Till this point everything was working fine. ...Recently however I did some refactor and move classes a bit. Entity in the project works fine unless I try to do ...Add-Migration... or ...Update-Database.......
asp.net-mvc c# entity-framework entity-framework-6 powershell
asked by BStrach

Entity Framework won't install properly, Enable-Migrations command fails

I am trying to follow this tutorial: ...https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/...I am using Visual Studio 2017 and Net 4.6.1....Right off the bat, things seem to go wrong. When I use the command ...Install-Package EntityFr...
entity-framework-6
asked by awlman

Automatically instantiate OneToOne Relationship in EntityFramework (in Combination with WPF)

I have two Classes:...Book...MultilingualString (Which has many Translations, but thats not important for this example)...My goal is to automatically Instantiate the Reference from Book to MultilingualString (...Book.Description...)....This is in a relati...
c# entity-framework entity-framework-6
asked by bergerb

How to Conditionally the column in LINQ OrderByDescending for OrderBy in C#?

How to Conditionally sort the column using LINQ OrderBy Clause....ex- I have a Property ...Filter.OrderBy... and ...Filter.Order... . In ...OrderBy... could be many ex> Name, Address ,City etc and ...Order... will be ascending or descending but I am not s...
.net c# dynamic-linq entity-framework linq
asked by Rahul Sharma

Entity Framework - error: the principal end of this association must be explicitly configured

I have a project built on the top of the ASP.NET MVC 5 framework. I am using Entity Framework 6.2 to access data from my database....I have the following two models...public class Entity<T> where T : struct { [Key] public T Id { get; set; } } pub...
asp.net-mvc asp.net-mvc-5.1 entity entity-framework entity-framework-6
asked by user12310517

How to initialize new column

I am using EF Core to interface with SQL Server. Suppose I add a new nullable property to an existing entity (i.e. a new nullable column to an existing table). How do I get the migration to set the newly added column to a default, non-null value in EXISTI...
c# entity-framework entity-framework-6 entity-framework-core
asked by Bob.at.Indigo.Health

Convert query from SQL to Entity Framework code first approach

I want to convert my SQL query into Entity Framework code-first but unable to do it....This is my SQL query...select * from tests where id in(select testid from PatientTests where PatientId=@id) ...This is Test Model from this model I want to fetch record...
entity-framework entity-framework-6 entity-framework-core sql-server
asked by SK jha

Priority in retrieving Data from mysql database and filtering the retrieved data

I want to retrieve only one column of my data base. The following code works truly:...This is my customer in mysql-table/model-in-EF6... public partial class customers { public customers() public int CustomerID { get; set; } pu...
c# entity-framework-6
asked by ehsan_kabiri_33

EF6 no data in many-to-many table

I'm learning ASP.NET MVC and EF with ...Getting Started with EF 6 using MVC 5... tutorial (Contoso University sample application). It's my first question here, so forgive me if the form of the question isn't perfect (tell me what's wrong anyway)....I've ...
asp.net-mvc c# entity-framework-6
asked by M.C.

How to asynchronously call a relation when lazy loading with Entity Framework 6.4?

I have a project that used Entity-Framework 6.4 to access data from the database....I have the following model...public class Product { public int Id { get; set; } public string Title { get; set; } public bool Available { get; set; } // ..
async-await c# entity-framework entity-framework-6 lazy-loading
asked by user13200557

Entity Framework making nullable unsigned int field's value as null while saving into database

I'm having this weird problem where I try to save the value of an unsigned ...nullable... field into a db using ...Entity Framework 6... and it always sets the value as NULL in Db even when I send actual values to save. I'm not sure what I'm doing wrong h...
.net c# dbcontext entity-framework-6 nullable
asked by Ash K

Inner join query in EF6

I Need some help with a query for my MVC Application....I created this query in SQL:...SELECT Projects.ID, Projects.ProjectName, Employees.ID FROM Projects INNER JOIN (Employees INNER JOIN ProjectEmployees ON Employees.ID = ProjectEmployees.EmployeeId) O...
entity-framework-6 linq
asked by Telefisch

How to add stored procedures to Entity Framework Core DbContext?

I am in the process of converting my ...DbContext... from EF 6 to EF Core. In my ...DbContext... there are stored procedures defined as such:...public virtual ObjectResult<Nullable<int>> StoredProcedureOne(Nullable<int> maxValue, Nullable<int> minValue) {...
.net-core c# entity-framework-6 entity-framework-core
asked by GlobalJim

Unable to convert SQL query to Entity Framework Core

I am unable to convert my SQL query to Entity Framework Core....The SQL query is: ...select * from tests join TestParameters on (tests.Id = TestParameters.TestId) join PatientTests on (Tests.Id = PatientTests.TestId) where PatientId = 3 ...The models ...
asp.net-core asp.net-core-2.0 entity-framework entity-framework-6 entity-framework-core
asked by SK jha

Bind Data to Specific Columns of Datagridview - Entity Framework

I don't know if I should take all the data or just the one I need :) I am doing it for the first time. I want to bind this data to Specific columns...See select...var SQLquery = (from artikel in db.DHH_Lagerverwaltung_Artikel join hersteller in db.DHH_Lag...
c# entity-framework entity-framework-6
asked by Thomas

Page 346 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!