public static TransactionModel ToModel(this TransactionsStoredItem transactionModel) => new TransactionModel() { Id = transactionModel.Id, DateAdded = transactionModel.DateAdded, Note = transactionModel.Note, Product = transactionModel.Product, User = transactionModel.User };
public void AddNew(TransactionsStoredItem transaction) { EfUnitOfWork.ThrowIfNoContext(); EfUnitOfWork.Context.Transactions.Add(transaction); }