Ejemplo n.º 1
0
        //============================================================
        //
        //
        //============================================================
        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();
             }
        }
Ejemplo n.º 2
0
        //============================================================
        //
        //
        //============================================================
        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;
             }
        }