Exemple #1
0
 /// <summary>
 /// This is the get Constituencyby id.
 /// </summary>
 /// <param name="constituencyId"></param>
 /// <returns></returns>
 public ConstituencyResponseModel GetConstituencyById(int constituencyId)
 {
     try
     {
         if (constituencyId != 0)
         {
             return(constituencyRL.GetConstituencyById(constituencyId));
         }
         else
         {
             return(null);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 /// <summary>
 /// It fetch the single specified Constituency details
 /// </summary>
 /// <param name="ConstituencyId">Constituency Id</param>
 /// <returns>If Successfully fetch, It return ConstituencyAddResponseModel or else null</returns>
 public ConstituencyAddResponseModel GetConstituencyById(int ConstituencyId)
 {
     try
     {
         if (ConstituencyId <= 0)
         {
             return(null);
         }
         else
         {
             return(_constituencyRepository.GetConstituencyById(ConstituencyId));
         }
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }