Example #1
0
        public IHttpActionResult Post([FromBody] ConcertPlaceModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var succes = ServiceResponce.FromSuccess().Result("Concert schedules save complete");
            var error  = ServiceResponce.FromFailed().Result($"Error save concert schedules");
            var res    = _concertService.SaveConcertPlace(model);

            if (res != null)
            {
                succes.Add("ConcertPlaceId", res.Id);
            }
            return(Ok(res != null ? succes.Response() : error.Response()));
        }