Exemplo n.º 1
0
 public DataModel.Response.FindItemReponse <DataModel.Model.PresentationModel> GetPresentationByID(string presentationID)
 {
     try
     {
         IPresentationRepository preRepository = RepositoryClassFactory.GetInstance().GetPresentationRepository();
         Presentation            pre           = preRepository.FindByID(presentationID);
         var _pre = MapperUtil.CreateMapper().Mapper.Map <Presentation, PresentationModel>(pre);
         return(new FindItemReponse <PresentationModel>
         {
             Item = _pre,
             ErrorCode = (int)ErrorCode.None,
             Message = string.Empty
         });
     }
     catch (Exception ex)
     {
         return(new FindItemReponse <PresentationModel>
         {
             ErrorCode = (int)ErrorCode.Error,
             Message = ex.Message
         });
     }
 }