public async Task <CreateGMExaminationRes> CreateGMExamination(CreateGMExaminationReq request) { DynamicParameters parameters = new DynamicParameters(); parameters.Add("@DateStart", request.DateStart); parameters.Add("@DateEnd", request.DateEnd); parameters.Add("@Advances", request.Advances); parameters.Add("@Discount", request.Discount); parameters.Add("@OrganizationId", request.OrganiationId); using (var result = SqlMapper .QueryFirstOrDefaultAsync <CreateGMExaminationRes>(cnn: connection, sql: "sp_CreateGroupMedicalExamination", param: parameters, commandType: CommandType.StoredProcedure)) try { return(await result); } catch (Exception) { return(new CreateGMExaminationRes()); } }
public async Task <IActionResult> CreateGMExamination(CreateGMExaminationReq request) { return(Ok(await _gMExaminationServices.CreateGMExamination(request))); }
public async Task <CreateGMExaminationRes> CreateGMExamination(CreateGMExaminationReq request) { return(await _gMExaminationRepository.CreateGMExamination(request)); }