Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
57 views

I'm using GraphDiff library in my c# project to update a disconnected graph. My Document entity has a one-to-many relationship with DocumentRelationShip entity as ToDocumentRelationship navigation ...
Masoud's user avatar
  • 8,246
1 vote
0 answers
39 views

After using UpdateGraph, if an associated collection has an attribute from the same class as the parent node, this attribute ends up being updated with a reference to the parent node. The scenario is: ...
Igor Martins's user avatar
4 votes
1 answer
186 views

I'm trying to use GraphDiff and Entity Framework to update a set of records across multiple tables. Everything works except I need to delete the orphaned record for any of the owned entities that may ...
m4gik's user avatar
  • 458
0 votes
1 answer
47 views

I am having an issue with GraphDiff whilst saving some data and I just need some one to confirm if this is possible. I will provide an example of what is going on: Firstly, I am using VS2017 (latest ...
gilesrpa's user avatar
  • 1,071
0 votes
1 answer
106 views

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 => ...
Simple Code's user avatar
  • 2,654
3 votes
0 answers
134 views

I am using EF6 and GraphDiff 2.0.1. I want to check for DbUpdateConcurrencyException when I save an outdated entry. When I do this without an UpdateGraph: no problem, EF raises the exception. try { ...
Gr0m_'s user avatar
  • 31
1 vote
0 answers
73 views

I use GraphDiff to save detached object hierarchy which represent the following data model, project -> course -> module -> topic. Problem is when I try to reorder the object hierarchy from, ...
AkilaI's user avatar
  • 131
0 votes
0 answers
195 views

to make things not too complex, I will not take my own entity model for this question but the one from the original GraphDiff-Blog-Post here where there is a company entity that has multiple contacts. ...
Michael Faisst's user avatar
1 vote
1 answer
452 views

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 ...
Hakan Fıstık's user avatar
1 vote
3 answers
447 views

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; ...
Ivan-Mark Debono's user avatar
1 vote
1 answer
664 views

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....
Ivan-Mark Debono's user avatar
30 votes
1 answer
17k views

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 ...
Masoud's user avatar
  • 8,246
35 votes
2 answers
997 views

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 ...
Masoud's user avatar
  • 8,246
0 votes
0 answers
268 views

I'm trying to use GraphDiff (latest available version in NuGet) to handle what I consider a not terribly difficult entity model. Consider a model like so: class A { public virtual ICollection<...
roufamatic's user avatar
  • 18.6k
1 vote
1 answer
531 views

When using graphDiff for creating a record the new id isn't getting populated back into the entity after saveChanges() is called. Its been logged on the github repo here - https://github.com/...
Michael Esteves's user avatar
2 votes
1 answer
1k views

I am using a third party library GraphDiff which adds Extension methods to DBContext class. My Context class is inherited from Interface like following MyContext: DbContext,IMyContext IoC ...
InTheWorldOfCodingApplications's user avatar
1 vote
1 answer
485 views

I have just added GraphDiff in an existing Entity Framework solution which is utilizing Moq framework for testing. All my tests that are using Moq in insert and update methods are now failing since ...
vipasane's user avatar
  • 355
4 votes
1 answer
368 views

I'm using EF6 with graphdiff and EDMX and must ignore a property of a particular entity. How should I do since even getting the property the insert or update always leave the NULL field?
user3707330's user avatar
0 votes
0 answers
71 views

I have these models: public class Address { public int Id {get; set;} public string Street {get; set;} public string HouseNo {get; set;} } public class Customer { public int Id {get; ...
Ivan-Mark Debono's user avatar
7 votes
1 answer
5k views

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;}...
Ivan-Mark Debono's user avatar
0 votes
1 answer
190 views

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 ...
Ivan-Mark Debono's user avatar
2 votes
1 answer
427 views

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 ...
Ivan-Mark Debono's user avatar
2 votes
1 answer
325 views

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 ...
Florian F.'s user avatar
  • 4,700
4 votes
1 answer
348 views

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) { ...
Nick Louloudakis's user avatar
0 votes
0 answers
205 views

I have some models: public class RootEntity { public int Id {get; set;} public virtual ICollection<AbstractEntity> CollectionA {get; set;} } public abstract class AbstractEntity { ...
WAKU's user avatar
  • 349
1 vote
1 answer
376 views

I am working on a project with a very complex entity. The object graph contains approximately 30 objects in a tree with two levels (there are children of children). The entity is managed in a browser,...
Tibor Molnar's user avatar
1 vote
0 answers
363 views

I am using GraphDiff to update complicate object graphs. My main entity has multiple children that may be created, updated or deleted (OwnedCollections in graphDiff). So in GraphDiff when an entity ...
Athina's user avatar
  • 1,176
3 votes
1 answer
1k views

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 ...
Codehelp's user avatar
  • 4,907
1 vote
1 answer
473 views

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 ...
Arne H. Bitubekk's user avatar
1 vote
1 answer
393 views

I'm using GraphDiff with EF to update state of disconnected objects acquired from a REST Service. It's working rather well from now but I got a problem with self referencing entities. Entities : ...
Florian F.'s user avatar
  • 4,700
1 vote
1 answer
83 views

I have three tables ShippingZone ShippingZoneID -> PK ZoneShippingMethod: ZoneShippingMethodID -> PK ShippingZoneID -> FK ZoneShippingMethodRange ZoneShippingMethodID -> ...
Codehelp's user avatar
  • 4,907
1 vote
1 answer
788 views

I have the following entities: public class Profile { [Required] public string Name { get; set; } [Required] public string Description { get; set; } [Key, DatabaseGenerated(...
Cesar's user avatar
  • 527
1 vote
1 answer
144 views

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)....
user2363071's user avatar
3 votes
2 answers
1k views

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 ...
Masoud's user avatar
  • 8,246
2 votes
1 answer
379 views

I am having an issue with GraphDiff attaching an object which has a recursive many-to-many relationship. I am using GraphDiff 2.0.1 and Entity Framework 6.1.1. The progam manages Recipes which can ...
Croberts's user avatar
  • 393
1 vote
0 answers
2k views

I have a class Ricevuta which holds a collection of VoceRicevuta: public partial class Ricevuta : GestPreBaseBusinessObject { [Key, DatabaseGenerated(DatabaseGeneratedOption.None)] public ...
lorenzop's user avatar
  • 545
2 votes
0 answers
262 views

I'm currently working on a project that requires we be able to pull up the exact state of an object and associated children at an point in time. To do this we've come up with a model similar to this: ...
aasukisuki's user avatar
  • 1,253
1 vote
2 answers
276 views

Example: A SalesOrder is composed of a SalesOrderHeader and one or more SalesOrderItems. When editing an existing SalesOrder, the SalesOrderHeader can be modified and SalesOrderItems can be added,...
BahKoo's user avatar
  • 109
3 votes
1 answer
901 views

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 ...
Masoud's user avatar
  • 8,246
5 votes
1 answer
177 views

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 ...
Masoud's user avatar
  • 8,246
3 votes
1 answer
3k views

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. ...
Matt's user avatar
  • 67
1 vote
0 answers
160 views

I'm using Entity Framework in an application with a existing SQL Server db. Can GraphDiff be used in a database first scenario, assuming I use the POCO Entity Generator?
SteveA's user avatar
  • 11
2 votes
1 answer
3k views

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 {...
DaveF's user avatar
  • 6,929
2 votes
2 answers
3k views

I have a complex graph with a collection child entities.The relationship between parent and child entities is one-many relationship and has an Independent association. I know that I cant persist my ...
Mady's user avatar
  • 469
3 votes
1 answer
2k views

This is my model: - Business - BusinesType - FK - Categories (*) - FK - Branch (*) - BranchType - FK - Address - Phone (*) - CustomFields (*) - OpeningTimes (*) ...
Shimmy Weitzhandler's user avatar