示例#1
0
        public async Task <IHttpActionResult> AddHiveSectionProduct([FromBody] UpdateHiveSectionProductRequest createRequest)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var item = await _hiveSectionProductService.CreateHiveSectionProductAsync(createRequest);

            var location = string.Format("/api/items/{0}", item.Id);

            return(Created <HiveSectionProduct>(location, item));
        }