コード例 #1
0
ファイル: Workspaces.cs プロジェクト: zakkain/agora
        //============================================================
        //
        //
        //============================================================
        void IWorkspaces.Save(EWorkspace workspace)
        {
            using(AgoraDataContext DB = new AgoraDataContext())
            {
                SWorkspace dbWorkspace = DB.Workspaces.Single(o=>o.WorkspaceID==workspace.WorkspaceID);

                dbWorkspace.UpdatedOn   = DateTime.UtcNow;
                dbWorkspace.UpdatedBy   = 0;
                dbWorkspace.Name        = workspace.Name;
                dbWorkspace.Description = workspace.Description;

                DB.SaveChanges();
             }
        }
コード例 #2
0
ファイル: Workspaces.cs プロジェクト: zakkain/agora
        //============================================================
        //
        //
        //============================================================
        EWorkspace IWorkspaces.Load()
        {
            using(AgoraDataConte//gElements.Add(new EWorkspaceElement() { Data = "SERVER1" });
            //gElements.Add(new EWorkspaceElement() { Data = "SERVER2" });
            //gElements.Add(new EWorkspaceElement() { Data = "SERVER3" });
 new AgoraDataContext())
            {
                SWorkspace dbWorkspace = DB.Workspaces.Single(o=>o.WorkspaceID==workspace.Workspac   
                EWorkspace oWorkspace = new EWorkspace()
                {   
                    WorkspaceID = dbWorkspace.WorkspaceID,
                    Name        = dbWorkspace.Name,
                    Description = dbWorkspace.Description
                };

                return oWorkspace;
             }
        }