public IResult Delete(Like id) { var like = _likeDal.Get(like1 => like1.UserId == id.UserId && like1.PhotoId == id.PhotoId); if (like != null) { _likeDal.Delete(like); } return(new SuccessResult()); }
public IResult Delete(int id) { IResult result = BusinessRule.Run ( CheckIfLikeAlreadyDeleted(id) ); if (result != null) { return(result); } var deleteToLike = _likeDal.Get(l => l.Id == id); _likeDal.Delete(deleteToLike); return(new SuccessResult()); }
public void Delete(int likeId) { var entity = GetLikeById(likeId); _likeDal.Delete(entity); }