public GoodsOwn Update(GoodsOwn entity) { var value = entity; unitOfWork.GoodsOwnRepository.Update(value); return(entity); }
public GoodsOwn Create(GoodsOwn entity) { var valueToInsert = entity; unitOfWork.GoodsOwnRepository.Add(valueToInsert); unitOfWork.SaveTablesChanges("dbo.Goods_Own"); entity.Id = valueToInsert.Id; return(entity); }
private void CreateBtn_OnClick(object sender, RoutedEventArgs e) { if (!ValidateForm()) { return; } var goodsOwn = new GoodsOwn(); CategoryDTO tempCategory; goodsOwn.Id = GoodsOwnDtos[^ 1]?.Id + 1 ?? 1;