示例#1
0
        public Workspace Create(string name, User owner)
        {
            var ws = new Workspace {Name = name, Owner = owner};
            Database.Workspaces.Add(ws);
            Database.SaveChanges();

            return ws;
        }
示例#2
0
 public void UpdateWorkspace(Workspace ws)
 {
     Database.ObjectContext.ApplyCurrentValues("Workspaces", ws);
     Database.SaveChanges();
 }
示例#3
0
 public void AddWorkspace(Workspace workspace)
 {
     Database.Workspaces.Add(workspace);
     Database.SaveChanges();
 }