示例#1
0
        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 = "";
        }
示例#3
0
        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"));
        }