zzz projects Entity Framework Graph Diff EF Graph Diff
Documentation Knowledge Base GitHub  Help & Donate
Online Examples
  • Documentation
  • Knowledge Base
  • GitHub
  • Help & Donate
  • Online Examples
  •   Download  

Entity Framework Graph Diff - Knowledge Base (KB)

19 results in tag: c#

How to update an expression tree with GraphDiff

The object graph I'm working with is basically:...public class Resource { public string Forename { get; set; } public string Surname { get; set; } public int EmployeeNumber { get; set; } public ICollection<Skill> Skills...
c# entity-framework graphdiff
asked by DaveF

Update Many-to-Many Association with GraphDiff

I have the following data model:...My business logic works with detached entities so I'm using GraphDiff to perform updates. I'm having trouble updating the PerfModes/CalcPoints association. Conceptually, Block owns CalcPoints and PerfModes, but CalcPoint...
c# entity-framework-6 graphdiff
asked by Matt

Casting an expression to another one

I have following expression...Expression<Func<T, object>> expr1;...Is there any way to cast it to ...Expression<Func<IUpdateConfiguration<T>, object>>...?...[Update]...Or create a new ...Expression<Func<IUpdateConfiguration<T>, object>>... from the existi...
c# casting expression generics graphdiff
asked by Masoud

Update entity graph Ids with Db generated Ids in Disconnected environment(EF)

I'm working with ...EF6 code first... in a ...WinForm... project. I used following method for reading entities from ...Db..., updating them and then save back them to ...Db...:...Read Entity graph using ...Linq to entities...(after reading the ...DbContex...
c# ef-code-first entity-framework graphdiff repository
asked by Masoud

Updating a many-to-many relation using GraphDiff cause an error

I'm using ...EF code first 6.1... with ....NET 4... in my application and have following classes in my model(I cut other unrelated parts of diagram. e.g ...Permission... has other navigations): ...My business logic works with detached entities so I'm usin...
c# ef-code-first entity-framework graphdiff many-to-many
asked by Masoud

How do I combine two expression tree bodies?

If I have:...m => m.OwnedCollection(p => p.Addresses) ...and...m => m.OwnedCollection(p => p.Contacts) ...I'd like to combine them to be:...m => m.OwnedCollection(p => p.Addresses).OwnedCollection(p => p.Contacts) ...Is there a way of doing this?...I'd al...
c# expression graphdiff lambda linq
asked by user2363071

Setting association to foreign key to inherited object using graphdiff and Entity Framework

I have a issue with updating value on a foreign key which is inheriting from another class. I am working with detached object in Entity Framework, so I'm using graphdiff to handle it....I've simplified the code to make it easier to read...Project class:..
c# ef-code-first entity-framework graphdiff
asked by Arne H. Bitubekk

Updating data in two related tables using GraphDiff

I have two tables, Order and OrderItems...The Order table has a OrderId column that's the primary key The OrderItems also has this column as foriegn key....For a given Order, if the OrderId is 1 and it has two items the OrderItems table will have two rows...
c# entity-framework graphdiff
asked by Codehelp

Empty rows insertion in Many-to-One and Many-to-Many relationships in GraphDiff

I am using GraphDiff, along with the latest version of the Entity Framework, following the code-first approach....I am trying to update a ...Food... entity this way:...public void Update(Food food) { using (var db = new DatabaseMappingContext()) {...
c# ef-code-first entity-framework graphdiff
asked by Nick Louloudakis

Inserting entity doesn't update Key field

I'm trying to insert a detached entity into database using GraphDiff....It goes something like :...public IHttpActionResult Post([FromBody] Foo foo) { var newFoo = fooBusiness.AddObject(foo); if (newFoo != null) { return CreatedAtRoute("Ge...
c# entity-framework graphdiff
asked by Florian F.

Can GraphDiff be used for partial updates of simple entities too?

I have a WebApi2 project with EF6 CodeFirst. I'm also using AutoMapper to map between my models and dto's. I'm not using OData. ...I'm trying to find a solution to handle updates of entities. As I'm not using OData I can't use Delta and I would not like t...
asp.net-web-api2 c# entity-framework graphdiff
asked by Ivan-Mark Debono

Should foreign Id properties be mapped from Model to Dto?

If I have the following model:...public class Customer { public int Id {get; set;} public int CustomerTypeId {get; set;} public virtual CustomerType {get; set;} } ...Should the Dto exclude foreign Id's to look like this:...public class Custome...
automapper c# entity-framework graphdiff
asked by Ivan-Mark Debono

How to update related entities using GraphDiff?

I have the following model:...public class Customer { public int Id {get; set;} public string Name {get; set;} public int AddressId {get; set;} public virtual Address Address {get; set;} public virtual ICollection<CustomerCategory> Cat...
c# ef-code-first entity-framework graphdiff
asked by Ivan-Mark Debono

Conditional mapping with graphdiff

I have following entities in my ...DbContext...:...public class A { public A() { Bs = new List<B>(); } public ICollection<B> Bs { set; get; } } ...Sometimes I Want to update ...a... graph:...var a = dbContext.As .AsNoTrackin...
c# ef-code-first entity-framework graphdiff
asked by Masoud

The relationship could not be changed because one or more of the foreign-key properties is non nullable

I get following error during update with EF:...The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set ...
c# ef-code-first entity-framework graphdiff
asked by Masoud

When to disable proxy generation and use AsNoTracking?

In my WebApi project, I use EF6, follow Uow and generic repository patterns, and I also map my models to dto's and vice-versa. ...Currently I set the following when creating the ...dbContext...:...this.Configuration.LazyLoadingEnabled = false; this.Config...
asp.net-web-api c# ef-code-first entity-framework graphdiff
asked by Ivan-Mark Debono

The relationship could not be changed because one or more of the foreign-key properties is non-nullable on saving

I use ...GraphDiff... to update detached object graphs, and I'm getting the above exception when saving a parent and its children....The models and mapping are:...public class Group { public int Id { get; set; } public virtual ICollection<GroupUse...
c# entity-framework entity-framework-6 graphdiff
asked by Ivan-Mark Debono

Delete Owned Entities 2 level depth using GraphDiff

I am using Entity Framework code first (version 6) and GraphDiff in my MVC project....here is some entities which map some tables in database....public class CommunicationPlan { public int CommunicationPlanID { get; private set; } [Owned] pu...
c# ef-code-first entity-framework graphdiff
asked by Hakan Fıstık

How to update self-reference graph using GraphDiff?

I am using ...GraphDiff... to update entity framework graphs and when I am trying to update self-referenced graph like this way:... dbContext.UpdateGraph(updatedStorageRequest, storageRequestMap => storageRequestMap .OwnedCollection(oc...
c# entity-framework graphdiff
asked by Simple Code

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
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!