Ejemplo n.º 1
0
        public async Task <IActionResult> Save(InstanceModel model)
        {
            if (ModelState.IsValid == false)
            {
                return(View("InstanceMaintenance", model));
            }

            if (model.Id > 0)
            {
                await _instanceRepository.UpdateAsync(model);
            }
            else
            {
                await _instanceRepository.InsertAsync(model);
            }

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public Task <InstanceModel> Insert(InstanceModel model)
 {
     return(_dataAdapter.InsertAsync(model));
 }