public async Task OnGetAsync(long id) { Dto = await _service.GetByIdAsync(id); if (Dto == null) { throw new VinoDataNotFoundException(); } }
public async Task OnGetAsync(long?id, long?pid) { if (id.HasValue) { Dto = await _service.GetByIdAsync(id.Value); if (Dto == null) { throw new VinoDataNotFoundException(); } ViewData["Mode"] = "Edit"; } else { Dto = new MemberAddressDto(); ViewData["Mode"] = "Add"; } }
public ActionResult Update(MemberAddressDto dto) { var result = _memberaddressContract.Update(dto); return(Json(result, JsonRequestBehavior.AllowGet)); }