Example #1
0
 public DTO.HashTagDTO Delete(DTO.HashTagDTO item)
 {
     DAL.Context.HashTag entity = repository.Get(item.HashTagId);
     repository.Delete(entity);
     repository.SaveChanges();
     return(item);
 }
Example #2
0
 public void CreateOrUpdate(DTO.HashTagDTO item)
 {
     DAL.Context.HashTag entity = mapper.Map <DTO.HashTagDTO, DAL.Context.HashTag>(item);
     repository.CreateOrUpdate(entity);
     repository.SaveChanges();
 }
Example #3
0
 public DTO.HashTagDTO Get(int id)
 {
     DAL.Context.HashTag entity = repository.Get(id);
     return(mapper.Map <DAL.Context.HashTag, DTO.HashTagDTO>(entity));
 }