public void Update(EmpresaVM viewModel) { var model = EmpresaAdapter.ToModel(viewModel, true); this._EmpresaRepository.Update(model); this._EmpresaRepository.SaveChanges(); }
public List <EmpresaVM> AllByTermo(string termo) { return(this._EmpresaRepository.GetAllByTermo(termo).Select(x => EmpresaAdapter.ToViewModel(x, true)).ToList()); }
public List <EmpresaVM> All() { return(this._EmpresaRepository.GetAll(true).Select(x => EmpresaAdapter.ToViewModel(x, true)).ToList()); }
public EmpresaVM Detail(int id) { return(EmpresaAdapter.ToViewModel(this._EmpresaRepository.Get(id), true)); }