public DTO.HashTagDTO Delete(DTO.HashTagDTO item) { DAL.Context.HashTag entity = repository.Get(item.HashTagId); repository.Delete(entity); repository.SaveChanges(); return(item); }
public void CreateOrUpdate(DTO.HashTagDTO item) { DAL.Context.HashTag entity = mapper.Map <DTO.HashTagDTO, DAL.Context.HashTag>(item); repository.CreateOrUpdate(entity); repository.SaveChanges(); }