Exemplo n.º 1
0
 public static void RemoveParent(string name)
 {
     using (context = new Context()){
         context.Parents.Remove(context.Parents.ToList().Find(x => x.Name == ApproximateSearch.GetTopResult(name, context.Parents.Select(y => y.Name).ToArray())));
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public static Child[] SearchChildrenByName(string name)
 {
     using (context = new Context()){
         return(context.Children.Where(x => x.Name == ApproximateSearch.GetTopResult(name, GetChildrenNames())).ToArray());
     }
 }
Exemplo n.º 3
0
 public static Course GetCourseByName(string name)
 {
     using (context = new Context())
         return(context.Courses.ToList().Find(x => x.Name == ApproximateSearch.GetTopResult(name, GetCoursesNames())));
 }
Exemplo n.º 4
0
 public static Parent SearchParentByName(string name)
 {
     using (context = new Context()){
         return(context.Parents.ToList().Find(x => x.Name == ApproximateSearch.GetTopResult(name, GetParentsNames())));
     }
 }