public DiaryW(Diary diary)
        {
            this.Id = diary.Id;
            this.Number = diary.Number;
            this.LetterNumber = diary.LetterNumber;
            this.LetterDate = diary.LetterDate;
            this.AcceptanceDateAndTime = diary.AcceptanceDateAndTime;
            this.Contractor = diary.Contractor;
            this.ClientId = diary.ClientId;
            this.Comment = diary.Comment;

            this.Client = diary.Client;
            this.Request = diary.Requests.FirstOrDefault();
            this.Products = diary.Products;
        }
        public Diary ToBase()
        {
            Diary diary = new Diary();

            diary.Id = this.Id;
            diary.Number = this.Number;
            diary.LetterNumber = this.LetterNumber;
            diary.LetterDate = this.LetterDate;
            diary.AcceptanceDateAndTime = this.AcceptanceDateAndTime;
            diary.Contractor = this.Contractor;
            diary.ClientId = this.ClientId;
            diary.Comment = this.Comment;

            diary.Client = this.Client;
            diary.Requests.Add(this.Request);
            diary.Products = this.Products;

            return diary;
        }