Answer the question
In order to leave comments, you need to log in
How to implement change tracking in linq2db?
There is a repository that can pull and save. At the same time, Save for a new object does Insert; for an existing Update
public interface IMyRepository
{
MyClass Get(Guid id);
void Save(MyClass myclass);
}
Answer the question
In order to leave comments, you need to log in
If I'm not mistaken, then linq2db is a microOrm that can only do mapping and generate queries.
Tracking is not there, because not everyone needs it and affects performance.
Usually only heavyweight ORMs like EF or Nhibernate have tracking.
Therefore, either you will have to write it yourself, or not use tracking at all (ie, divide Save into Insert + Update).
For example, I don't use it. Even in EF I turned it off for optimization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question