Example #1
0
 public GetItemResult <CPMUserBM> FinduserByUsername(string username)
 {
     try
     {
         return(ServiceResultsHelper.FillGetItemResult <CPMUserBM>(Mapper.Map <CPMUserBM>(_repo.GetUserByUserName(username))));
     }
     catch (Exception ex)
     {
         return(ServiceResultsHelper.FillGetItemResultForError <CPMUserBM>(ex));
     }
 }
Example #2
0
 public GetItemResult <bool> UserExists(string username)
 {
     try
     {
         return(ServiceResultsHelper.FillGetItemResult(_repo.UserNameExists(username)));
     }
     catch (Exception ex)
     {
         return(ServiceResultsHelper.FillGetItemResultForError <bool>(ex));
     }
 }
Example #3
0
 public GetItemResult <CPMUserBM> FinduserById(int id)
 {
     try
     {
         return(ServiceResultsHelper.FillGetItemResult <CPMUserBM>(Mapper.Map <CPMUserBM>(_repo.GetRecordById(id))));
     }
     catch (Exception ex)
     {
         return(ServiceResultsHelper.FillGetItemResultForError <CPMUserBM>(ex));
     }
 }
Example #4
0
 public override GetItemResult <OfferBM> GetItem(int id)
 {
     try
     {
         //ModelMappings.Configure();
         var result = Mapper.Map <OfferBM>(_repository.GetItem(id));
         return(ServiceResultsHelper.FillGetItemResult(result));
     }
     catch (Exception ex)
     {
         return(ServiceResultsHelper.FillGetItemResultForError <OfferBM>(ex));
     }
 }
Example #5
0
 public GetItemResult <WalletBM> GetWalletById(int walletId)
 {
     //ModelMappings.Configure();
     try
     {
         var result = Mapper.Map <WalletBM>(_repository.GetWalletByWalletId(walletId));
         return(ServiceResultsHelper.FillGetItemResult(result));
     }
     catch (Exception ex)
     {
         return(ServiceResultsHelper.FillGetItemResultForError <WalletBM>(ex));
     }
 }