public bool Exists(ProjectModel project)
 {
     return (DatabaseModelContainer.Current.ProjectSet.Any(x =>
                        x.Name.Equals(project.Name) &&
                        x.StartDate.Equals(project.StartDate) &&
                        x.EndDate == (project.EndDate) && x.Id != project.Id));
 }
 public void Edit(ProjectModel project)
 {
     var editableProject = DatabaseModelContainer.Current.ProjectSet.FirstOrDefault(x => x.Id == project.Id);
     editableProject.Name = project.Name;
     editableProject.StartDate = project.StartDate;
     editableProject.EndDate = project.EndDate;
 }
 public void Add(ProjectModel project)
 {
     DatabaseModelContainer.Current.ProjectSet.Add(project);
 }
 public static bool isDateValid(ProjectModel project)
 {
     return (project.EndDate == null || !(project.StartDate > project.EndDate));
 }