Ejemplo n.º 1
0
        /*
         * public void AddOperation(EROperation operation)
         * {
         *  operation.Id = Guid.NewGuid();
         *  using (var odb = OdbFactory.Open(dbFileName))
         *  {
         *      odb.Store(operation);
         *  }
         * }
         *
         * public void UpdateOperation(EROperation operation)
         * {
         *  using (var odb = OdbFactory.Open(dbFileName))
         *  {
         *      var db = odb.AsQueryable<EROperation>().Where(er => er.Id == operation.Id).FirstOrDefault();
         *      if (db != null)
         *      {
         *          odb.Delete(db);
         *      }
         *
         *      odb.Store(operation);
         *  }
         * }
         *
         * public void DeleteOperation(EROperation operation)
         * {
         *  using (var odb = OdbFactory.Open(dbFileName))
         *  {
         *      var db = odb.AsQueryable<EROperation>().Where(er => er.Id == operation.Id).FirstOrDefault();
         *      if (db != null)
         *      {
         *          odb.Delete(db);
         *      }
         *  }
         * }
         */

        public List <EROperation> GetOperations()
        {
            return(ERPropertyDefinition.LoadERProperties <List <EROperation> >(typeof(EROperation)));
        }
Ejemplo n.º 2
0
 public ERUser()
 {
     Id         = Guid.NewGuid();
     Properties = ERPropertyDefinition.LoadERProperties <List <ERProperty> >(this.GetType());
 }