public Workspace Create(string name, User owner) { var ws = new Workspace {Name = name, Owner = owner}; Database.Workspaces.Add(ws); Database.SaveChanges(); return ws; }
public void UpdateWorkspace(Workspace ws) { Database.ObjectContext.ApplyCurrentValues("Workspaces", ws); Database.SaveChanges(); }
public void AddWorkspace(Workspace workspace) { Database.Workspaces.Add(workspace); Database.SaveChanges(); }