public static Comment_Infra CommentFromDomainToInfra(this Comment_Domain @this) { if (@this != null) { return(new Comment_Infra() { Id = @this.Id, UserName = @this.UserName, UserId = @this.UserId, MessageFromUser = @this.MessageFromUser, ApprovalForPublishing = @this.ApprovalForPublishing }); } else { return(null); } }
public void UpdateComment(Comment_Domain inst) { repository.UpdateComment(inst.CommentFromDomainToInfra()); }
//Метод возвращает Id вновь созданного Отзыва public int?CreateComment(Comment_Domain inst) { return(repository.CreateComment(inst.CommentFromDomainToInfra())); }