public bool CreateSkill(MentorSkill mentorSkill) { try { context.MentorSkills.Add(mentorSkill); context.SaveChanges(); return(true); } catch (Exception) { throw; } }
public bool ApplyCourse(Course course) { try { context.Courses.Add(course); context.SaveChanges(); var noti = new Notification { StudentEmail = course.StudentEmail, MentorSkillId = course.MentorSkillId, Type = "request", IsStudent = false, IsMentor = true, CompletionStatus = 0 }; context.Notifications.Add(noti); context.SaveChanges(); return(true); } catch (Exception) { throw; } }