public void Update(HistoricoVM viewModel) { var model = HistoricoAdapter.ToModel(viewModel, true); this._historicoRepository.Update(model); this._historicoRepository.SaveChanges(); }
public List <HistoricoVM> All() { return(this._historicoRepository.GetAll(true).Select(x => HistoricoAdapter.ToViewModel(x, true)).ToList()); }
public HistoricoVM Detail(int id) { return(HistoricoAdapter.ToViewModel(this._historicoRepository.Get(id), true)); }