public Model.Models.ServiceResponse SetResponse(ServiceResponseInsertRequest request)
        {
            var entity = new Database.ServiceResponse()
            {
                AdministratorId = 1,
                Approved        = request.Approved,
                Explanation     = request.Explanation,
                FinishDate      = DateTime.ParseExact(request.FinishDate, "yyyy MMMM dd", null),
                Price           = request.Price,
                ServiceId       = request.ServiceId
            };

            var service = _context.Service.Find(request.ServiceId);

            if (service != null)
            {
                service.Responsed = true;
            }

            var e = _context.ServiceResponse.Add(entity);

            _context.SaveChanges();

            return(_mapper.Map <Model.Models.ServiceResponse>(entity));
        }
        public bool IsResponsed(int id)
        {
            Database.ServiceResponse entity = null;
            try
            {
                entity = _context.ServiceResponse.Where(x => x.ServiceId == id)
                         .First();
            }
            catch (Exception)
            {
                return(false);
            }

            if (entity == null)
            {
                return(false);
            }
            return(true);
        }