Example #1
0
        public void Update(EmpresaVM viewModel)
        {
            var model = EmpresaAdapter.ToModel(viewModel, true);

            this._EmpresaRepository.Update(model);
            this._EmpresaRepository.SaveChanges();
        }
Example #2
0
 public List <EmpresaVM> AllByTermo(string termo)
 {
     return(this._EmpresaRepository.GetAllByTermo(termo).Select(x => EmpresaAdapter.ToViewModel(x, true)).ToList());
 }
Example #3
0
 public List <EmpresaVM> All()
 {
     return(this._EmpresaRepository.GetAll(true).Select(x => EmpresaAdapter.ToViewModel(x, true)).ToList());
 }
Example #4
0
 public EmpresaVM Detail(int id)
 {
     return(EmpresaAdapter.ToViewModel(this._EmpresaRepository.Get(id), true));
 }