Exemple #1
0
        public object UpdateMany([FromBody] List <QualityDefinitionResource> resource)
        {
            //Read from request
            var qualityDefinitions = resource
                                     .ToModel()
                                     .ToList();

            _qualityDefinitionService.UpdateMany(qualityDefinitions);

            return(Accepted(_qualityDefinitionService.All()
                            .ToResource()));
        }
        private Response UpdateMany()
        {
            //Read from request
            var qualityDefinitions = Request.Body.FromJson <List <QualityDefinitionResource> >()
                                     .ToModel()
                                     .ToList();

            _qualityDefinitionService.UpdateMany(qualityDefinitions);

            return(_qualityDefinitionService.All()
                   .ToResource()
                   .AsResponse(HttpStatusCode.Accepted));
        }