public void Create(DomainComment domainComment, int userId, string kind) { domainComment.Date = DateTime.Now; domainComment.UserId = userId; var comment = Mapper.Map<Comment>(domainComment); /*switch (kind) { case "gift": { comment.WishListId = null; break; } case "wishList": { comment.GiftId = null; break; } }*/ Uow.CommentRepository.Insert(comment); Uow.Commit(); }
public void Update(DomainComment domainComment) { var comment = Mapper.Map<Comment>(domainComment); Uow.CommentRepository.Update(comment); Uow.Commit(); }