//public Guid UserId { get; set; } public void GetOtherScientificWorkFromModel(OtherScientificWork otherScientificWork) { otherScientificWork.Name = Name; otherScientificWork.Time = Time; otherScientificWork.ClassificationOfScientificWorkId = ClassificationOfScientificWorkId; //scientificWork.UserId = UserId; }
private List <LecturerViewModel> GetLecturer(OtherScientificWork otherScientificWork) { var lecturers = new List <LecturerViewModel>(); foreach (var lecturerInOtherScientificWork in otherScientificWork.LecturerInOtherScientificWorks) { lecturers.Add(new LecturerViewModel(lecturerInOtherScientificWork.Lecturer)); } return(lecturers); }
public OtherScientificWorkViewModel(OtherScientificWork otherScientificWork) : this() { if (otherScientificWork != null) { Id = otherScientificWork.Id; Name = otherScientificWork.Name; Time = otherScientificWork.Time; ClassificationOfScientificWork = new ClassificationOfScientificWorkViewModel(otherScientificWork.ClassificationOfScientificWork); Lecturers = GetLecturer(otherScientificWork); //User = new UserViewModel(scientificWork.User); //Lecturer = new LecturerViewModel; } }