You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not have the opportunity to ask something here.
But I wanted to know how you solved the problem with reading the Local for Set collection from the context as a issue.
I am using the previous version of the framework (based on EF 6.1.3), where I expanded the Set with the Local() method, in which I can check whether a given entity with the Identity key has already been created.
My problem came from the warehouse economy where individual items of the document transfer goods between warehouses. The commodity which is transferred to the new warehouse has a new resource (entity) created, which is created appropriately for each item.
However, you can choose the same item in two items, which will be double-opened (I want to avoid this situation). In this case, when I process the first document line I create the object, and in the second document position I want to refer to the local memory and read it. When I find the appropriate object, I will be able to update the amount of +=. If I do not find this object then I will want to create it respectively.
Hi @fruex , could you be so kind to submit a PR adding a unit test (possibly to: https://github.com/urfnet/URF.Core/blob/master/URF.Core.EF.Tests/RepositoryTest.cs) that asserts your specific use case? Sounds like distinguishing between local instance and possibly handling an "upsert" scenario? If you need to submit the PR with the unit test failing that's fine, again, this way we can understand the exact use case your trying to implement, thanks!
Hello,
I do not have the opportunity to ask something here.
But I wanted to know how you solved the problem with reading the Local for Set collection from the context as a issue.
I am using the previous version of the framework (based on EF 6.1.3), where I expanded the Set with the Local() method, in which I can check whether a given entity with the Identity key has already been created.
My problem came from the warehouse economy where individual items of the document transfer goods between warehouses. The commodity which is transferred to the new warehouse has a new resource (entity) created, which is created appropriately for each item.
However, you can choose the same item in two items, which will be double-opened (I want to avoid this situation). In this case, when I process the first document line I create the object, and in the second document position I want to refer to the local memory and read it. When I find the appropriate object, I will be able to update the amount of +=. If I do not find this object then I will want to create it respectively.
Reference to file https://github.com/urfnet/URF.Core/blob/master/URF.Core.EF/Repository.cs
The text was updated successfully, but these errors were encountered: