public async Task <T> Add(T entity) { var dbEntity = await Items.AddAsync(entity); await Save(); return(dbEntity.Entity); }
private async Task SentAsync() { Serverr.MainServer.Send(TaskManager.ViewModel.selectedData.Id, Encoding.ASCII.GetBytes("[<MESSAGE>]" + Text)); await Items.AddAsync(new StringValue() { Name = "Ты: " + Text }); Text = ""; }
public async Task <IActionResult> Create(Item obj) { var result = await _bllItems.AddAsync(new BO.Item() { Name = obj.Name, StartPrice = obj.StartPrice, MeasurementUnits = obj.MeasurementUnits, Amount = obj.Amount, SoldDate = obj.SoldDate, SoldPrice = obj.SoldPrice, Image = obj.Image, Details = obj.Details, InD = DateTime.Now }); return(RedirectToAction("Index")); }