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)

8 results in tag: fluent

Implementing Zero Or One to Zero Or One relationship in EF Code first by Fluent API

I have two POCO classes...public class Order { int id; string code; int? quotationId; //it is foreign key public int Id{get;set;} public string Code{get;set;} public int? QuotationId{get;set;} Quotation quotation; public v...
c# ef-code-first entity-framework entity-relationship fluent
asked by Masoud

EF Composite key fluent API

I am trying to map a composite key for an entity....public class Customer { public int CustomerId { get; set; } public virtual List<CustomerImage> CustomerImages { get; set; } } ...And its Map:...public class CustomerMap : EntityTypeConfiguration...
c# composite-key composite-primary-key entity-framework fluent
asked by Tomer

Duplicate navigation properties when using Entity Framework 6 and fluent api

I got two models with a relations....public class Customer { public Customer() { CustomerSites = new List<CustomerSite>(); } public IList<CustomerSite> CustomerSites { get; set; } } public class CustomerSite { public Gui...
c# entity-framework entity-framework-6 fluent foreign-keys
asked by ainteger

Entity Framework map struct/complex type without model properties

I have a 'model ...struct...' which is internally a string, but is being used to somewhat similiar to a ...GUID.......public struct Token { private string _value; private Token(Guid uuid) { _value = Token.FromGuid(uuid); } publi...
c# entity-framework entity-framework-6 fluent
asked by Acrotygma

Schema specified is not valid. Errors: The relationship was not loaded because the type is not available

I wish to reference the ...OrderAddress... model ...twice... in my ...Order... model; once as a ...ShippingAddress... and once as a ...BillingAdress.......On the other side, I want my ...OrderAddress... model to have a list of ...OrderAddresses.......Orde...
asp.net-mvc c# entity-framework fluent foreign-keys
asked by Fred Fickleberry III

Entity Framework 6 NotMapped attributes

Is there a way using the fluentAPI within a DbContext to manually include ICollections that have been [NotMapped] in the model? I know how to manually ignore properties using the fluentAPI ...modelBuilder.Entity<MyEntity>().Ignore(e => e.MyChildCollection...
ef-fluent-api entity-framework entity-framework-6 fluent
asked by Ted

Entity Framework - get related items without explicit reference using Fluent API configurations

Let's say I have database table A with optional property X. I have table B with a composite key (Y, X). These two tables are not explicitly related in any way....e.g....create table A ( Id uniqueidentifier not null, X uniqueidentifier null ) crea...
api c# entity-framework-6 fluent
asked by raj02

How can I set the foreign key name using the Fluent API with Code First Migrations?

I'm trying to set the foreign key name (not the foreign key column) using Code First Migrations on EF6.4....I know that it can be set by updating the generated migration code, like so:....ForeignKey("Documents", Function(t) t.DocumentId, cascadeDelete:=Tr...
c# ef-migrations entity-framework-6 fluent vb.net
asked by InteXX

Page 1 of 1
  • 1

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!