public async Task <Test> LinkSlotToTest(SaveSlotTestRequestArgs requestargs) { var data = await DbContext.ExecuteReaderAsync(DataConstants.PR_SAVE_SLOTTEST, CommandType.StoredProcedure, args => { args.Add("@TestID", requestargs.TestID); //args.Add("@UserID", userContext.GetContext().FullName); args.Add("@SlotID", requestargs.SlotID); }, reader => new Test { TestID = reader.Get <int>(0), StatusCode = reader.Get <int>(1) }); return(data.FirstOrDefault()); }
//[Authorize(Roles = AppRoles.PUBLIC)] public async Task <IHttpActionResult> LinkSlotToTest([FromBody] SaveSlotTestRequestArgs args) { var result = await testService.LinkSlotToTest(args); return(Ok(result)); }