public void SaveTaskSheet(int userId, TaskSheetData taskSheet) { AuthorizationHelper.ValidateLecturerAccess(Context, userId); var dp = Context.CourseProjects.Single(x => x.CourseProjectId == taskSheet.CourseProjectId); dp.InputData = taskSheet.InputData; dp.RpzContent = taskSheet.RpzContent; dp.DrawMaterials = taskSheet.DrawMaterials; dp.Consultants = taskSheet.Consultants; Context.SaveChanges(); }
public void SaveTaskSheet(int userId, TaskSheetData taskSheet) { AuthorizationHelper.ValidateLecturerAccess(Context, userId); var dp = Context.CourseProjects.Single(x => x.CourseProjectId == taskSheet.CourseProjectId); dp.InputData = taskSheet.InputData; dp.RpzContent = taskSheet.RpzContent; dp.DrawMaterials = taskSheet.DrawMaterials; dp.Consultants = taskSheet.Consultants; dp.HeadCathedra = taskSheet.HeadCathedra; dp.Faculty = taskSheet.Faculty; dp.Univer = taskSheet.Univer; dp.DateStart = taskSheet.DateStart; dp.DateEnd = taskSheet.DateEnd; Context.SaveChanges(); }