Ejemplo n.º 1
0
        /// <see cref="IConcertService.SaveConcertTicket"/>
        public ServiceResponce SaveConcertTicket(ConcertTicketModel model)
        {
            var succes = ServiceResponce.FromSuccess().Result("Concert tickets save complete");
            var error  = ServiceResponce.FromFailed().Result($"Error save concert tickets");
            var res    = _concertRepository.SaveConcertTicket(ConcertModelHelper.GetConcertTicket(model));

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