示例#1
0
        public async Task <IActionResult> GetAreas()
        {
            try
            {
                //await _service.Create(_list);

                var productions = await _service.Get();

                IEnumerable <ProductionModel> produtionModels = productions.Select(p => new ProductionModel
                {
                    ProductionId = p.ProductionId,
                    Restrictions = p.Restrictions,
                    On           = p.On
                });

                return(Ok(produtionModels));
            }
            catch { return(StatusCode(500)); }
        }