Ejemplo n.º 1
0
        public IHttpActionResult Post(int id, [FromBody] IEnumerable <ConcertProgrammModel> models)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var userId = User.Identity.GetUserId <int>();
            var succes = ServiceResponce.FromSuccess().Result("Concert programms save complete");
            var error  = ServiceResponce.FromFailed().Result($"Error save concert programms");

            return(Ok(_concertService.SaveConcertProgramm(id, models) ? succes.Response() : error.Response()));
        }