public virtual K2Field.SmartForms.Workspace.Data.WorkspaceUser Find(string username)
        {
            Data.WorkspaceUser u = DBSet.Find(username);

            ObservableCollection <Data.Workspace> ws = new ObservableCollection <Data.Workspace>();

            if (u != null)
            {
                foreach (Data.WorkspaceTeam t in u.WorkspaceTeams)
                {
                    foreach (Data.Workspace w in t.Workspaces)
                    {
                        if (!ws.Contains(w))
                        {
                            ws.Add(w);
                        }
                    }
                }

                u.Workspaces = ws;
            }

            return(u);

            //return DBSet.Find(username);
        }
Пример #2
0
 public virtual T GetById(int id)
 {
     return(DBSet.Find(id));
 }
Пример #3
0
 public virtual K2Field.SmartForms.Workspace.Data.Workspace Find(Guid id)
 {
     return(DBSet.Find(id));
 }
 public virtual T Find(Guid id)
 {
     return(DBSet.Find(id));
 }
Пример #5
0
 public TEntity FetchOrDefault(TKey primaryKey)
 {
     return(DBSet.Find(primaryKey));
 }
Пример #6
0
 public T GetById(int id)
 {
     return(DBSet.Find(id));
 }
Пример #7
0
 public virtual TEntity GetByID(params object[] keyValues)
 {
     return(DBSet.Find(keyValues));
 }
Пример #8
0
        public virtual void Delete(params object[] keyValues)
        {
            TEntity entityToDelete = DBSet.Find(keyValues);

            Delete(entityToDelete);
        }