Ejemplo n.º 1
0
 public Empresa GetEmpresaById(Empresa empresa)
 {
     try
     {
         return(_crudFactory.Retrieve <Empresa>(empresa));
     }
     catch (Exception e)
     {
         ExceptionManager.GetInstance().Process(e);
     }
     return(new Empresa());
 }
        public void Create(Empresa empresa)
        {
            try
            {
                var e = crudEmpresa.Retrieve <Empresa>(empresa);

                if (e != null)
                {
                    throw new BussinessException(3);
                }
                crudEmpresa.Create(empresa);
            }
            catch (Exception ex)
            {
                ExceptionManager.GetInstance().Process(ex);
            }
        }