Hello, I have a "webapi" in "Net Core" and I am using "Ado net" and "repository pattern".
My question is, if the repository is
public interface IRepository<T> where T : BaseEntity { int Add(T item); void Remove(int id); int Update(T item); T FindById(int id); IEnumerable<T> FindAll(); //IEnumerable<T> FindAll(T item); }
How can I have a transaction between the methods?
I want to have a transaction where it's called
Int Add (object1 item); Int Add (object2 item); Commit ();
I see that transactionscope is not for net core, how can I solve that case?