예제 #1
0
 public DTO.HashTagDTO Delete(DTO.HashTagDTO item)
 {
     DAL.Context.HashTag entity = repository.Get(item.HashTagId);
     repository.Delete(entity);
     repository.SaveChanges();
     return(item);
 }
예제 #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();
 }