Beispiel #1
0
 public void Update(BlModel model)
 {
     _repository.Update(MapperTools.MapTo <BlModel, DalModel>(model));
 }
Beispiel #2
0
        public BlModel GetById(int id)
        {
            var articleEntity = _repository.FindById(id);

            return(MapperTools.MapTo <DalModel, BlModel>(articleEntity));
        }
Beispiel #3
0
 public void Delete(BlModel model)
 {
     _repository.Remove(MapperTools.MapTo <BlModel, DalModel>(model));
 }
Beispiel #4
0
        public ICollection <BlModel> GetAll()
        {
            var articles = _repository.GetAll();

            return(MapperTools.MapToCollection <DalModel, BlModel>(articles));
        }
Beispiel #5
0
 public void Add(BlModel model)
 {
     _repository.Create(MapperTools.MapTo <BlModel, DalModel>(model));
 }