public void Setup() { var context = new VInsuranceContext(); UoW = new UnitOfWork(context); UoW.ClientRepository.Insert(new Model.Client { Id = Guid.NewGuid(), Email = "*****@*****.**", Name = "John", Role = "user" }); UoW.Save(); }
public UnitOfWork(VInsuranceContext context) { this._context = context ?? throw new ArgumentNullException(nameof(context)); //?? = si es null te devuelves }