/* * 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))); }
public ERUser() { Id = Guid.NewGuid(); Properties = ERPropertyDefinition.LoadERProperties <List <ERProperty> >(this.GetType()); }