Esempio n. 1
0
        public Task SaveNrOfSamplesAsync(SaveNrOfSamplesRequestArgs request)
        {
            var data = request.Samples.Select(x => new
            {
                id = x.MaterialID,
                nr = x.NrOfSample
            }).ToList();

            return(DbContext.ExecuteNonQueryAsync(DataConstants.PR_SAVE_NR_OF_SAMPLES,
                                                  CommandType.StoredProcedure,
                                                  args =>
            {
                args.Add("@FileID", request.FileID);
                args.Add("@DATA", data.ToJson());
            }));
        }
Esempio n. 2
0
        //[Authorize(Roles = AppRoles.PUBLIC)]
        public async Task <IHttpActionResult> SaveNrOfSamples([FromBody] SaveNrOfSamplesRequestArgs args)
        {
            await testService.SaveNrOfSamplesAsync(args);

            return(Ok(true));
        }