Пример #1
0
 public bool Update(Domicilios entity)
 {
     try
     {
         var entityDAL = new InmDAL.Domicilios();
         entityDAL.Barrio       = entity.Barrio;
         entityDAL.Calle        = entity.Calle;
         entityDAL.Ciudad       = entity.Ciudad;
         entityDAL.CP           = entity.CP;
         entityDAL.DomiciliosId = entity.DomiciliosId;
         entityDAL.Dto          = entity.Dto;
         entityDAL.Numero       = entity.Numero;
         entityDAL.Piso         = entity.Piso;
         var response = genericDal.Update(entityDAL);
         if (response != null)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Пример #2
0
 public bool Delete(Domicilios entity)
 {
     try
     {
         var entityDAL = new InmDAL.Domicilios();
         entityDAL.DomiciliosId = entity.DomiciliosId;
         var response = genericDal.Delete(entityDAL);
         if (response != null)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Пример #3
0
 public int Add(Domicilios entity)
 {
     try
     {
         var entityDAL = new InmDAL.Domicilios {
             Barrio = entity.Barrio,
             Calle  = entity.Calle,
             Ciudad = entity.Ciudad,
             CP     = entity.CP,
             Dto    = entity.Dto,
             Numero = entity.Numero,
             Piso   = entity.Piso
         };
         var response = genericDal.Add(entityDAL);
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }