public async Task <JsonResult> PostAsync(CreateHospitalGoodsRequest created) { created.UserId = UserId; var data = await _mediator.ToPipeAsync <CreateHospitalGoodsRequest, HospitalGoods>(created); return(Json(data)); }
public async Task <JsonResult> PostAsync(CreateHospitalGoodsRequest created) { created.UserId = Profile.Id; created.HospitalId = HospitalDepartment.Hospital.Id; var data = await _mediator.ToPipeAsync <CreateHospitalGoodsRequest, HospitalGoods>(created); return(Json(data)); }
public async Task <HospitalGoods> CreateAsync(CreateHospitalGoodsRequest created) { return(await _mediator.RequestAsync <CreateHospitalGoodsRequest, HospitalGoods>(created)); }