Ejemplo n.º 1
0
        public GetProyectoResponse GetProyecto(int proyectoId)
        {
            var response = new GetProyectoResponse()
            {
                IsValid = true
            };

            try
            {
                var proyecto = _proyectoRepository.GetOne(x => x.ProyectoId == proyectoId);
                if (proyecto != null)
                {
                    response.Proyecto = proyecto.ConvertToProyectoRowViewModel(null);
                }

                response.IsValid = true;
            }
            catch (Exception ex)
            {
                response.IsValid      = false;
                response.ErrorMessage = ex.Message;
            }

            return(response);
        }