/// <summary>
 /// Удаление комментария
 /// </summary>
 /// <param name="comment"></param>
 public void Delete(CommentViewModel comment)
 {
     commentsRepository.Delete(Convert(comment));
 }
 /// <summary>
 /// Редактирование комментария
 /// </summary>
 /// <param name="category"></param>
 public void Edit(CommentViewModel commentView)
 {
     commentView.UpdatedDate = DateTime.Now;
     commentsRepository.Add(Convert(commentView));
 }
 /// <summary>
 /// Конвертационные функции
 /// </summary>
 private Models.Comment Convert(CommentViewModel c)
 {
     return new Models.Comment()
     {
         Id = c.Id,
         CreatedDate = c.CreatedDate,
         UpdatedDate = c.UpdatedDate,
         Text = c.Text,
         CustomerId = c.CustomerId,
         ProductId = c.ProductId
     };
 }