Beispiel #1
0
 /// <summary>
 /// This is the method for update constituency.
 /// </summary>
 /// <param name="ConstituencyId"></param>
 /// <param name="constituencyUpdate"></param>
 /// <returns></returns>
 public ConstituencyResponseModel UpdateConstituency(int ConstituencyId, constituencyUpdate constituencyUpdate)
 {
     try
     {
         if (ConstituencyId != 0)
         {
             return(constituencyRL.UpdateConstituency(ConstituencyId, constituencyUpdate));
         }
         else
         {
             return(null);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 /// <summary>
 /// It update the Constituency
 /// </summary>
 /// <param name="ConstituencyId">Constituency Id</param>
 /// <param name="updateConstituency">Update Constituency Name and City Id</param>
 /// <returns>UpdateConstituencyResponseModel</returns>
 public UpdateConstituencyResponseModel UpdateConstituency(int ConstituencyId, UpdateConstituencyRequestModel updateConstituency)
 {
     try
     {
         if (ConstituencyId <= 0 || updateConstituency == null)
         {
             return(null);
         }
         else
         {
             return(_constituencyRepository.UpdateConstituency(ConstituencyId, updateConstituency));
         }
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }