public void Create(DalProject e)
 {
     var project = new Project()
     {
         Name = e.Name
     };
     context.Set<Project>().Add(project);
     context.SaveChanges();
 }
 public void Update(DalProject e)
 {
     var project = new Project()
     {
         ProjectId = e.Id,
         Name = e.Name
     };
     project = context.Set<Project>().Single(p => p.ProjectId == project.ProjectId);
     context.Entry(project).State = System.Data.Entity.EntityState.Modified;
     // throw new NotImplementedException();
 }
 public void Delete(DalProject e)
 {
     var project = new Project()
     {
         ProjectId = e.Id,
         Name = e.Name
     };
     project = context.Set<Project>().Single(p => p.ProjectId == project.ProjectId);
     context.Set<Project>().Remove(project);
     context.SaveChanges();
 }