//Task<bool> Add(RepositoryCharge newCharge) public virtual async Task <bool> Add(RepositoryCharge newCharge) { await Task.Delay(1); Charges entity = new Charges { Concept = newCharge.Description, Amount = newCharge.Amount, Identifier = newCharge.identifier, DateCreated = DateTime.Now }; chargesContext.Charges.Add(entity); chargesContext.SaveChanges(); return(true); }
public TEntity Add(TEntity Entity) { table.Add(Entity); _context.SaveChanges(); return(Entity); }