Пример #1
0
        /// <see cref="IConcertService.SaveActor"/>
        public ServiceResponce SaveActor(ActorModel model)
        {
            var succes = ServiceResponce.FromSuccess().Result("Actor save complete");
            var error  = ServiceResponce.FromFailed().Result($"Error save actor");
            var res    = _concertRepository.AddActor(ConcertModelHelper.GetActor(model));

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