//Guid uid, UserType type, UserState state, DateTime? ExpiresAt, string name public PostgresUser Build(DbDataReader reader) { Guid id = DbReaderUtils.GetGuid(reader, 0); UserType type = (UserType)DbReaderUtils.GetInt32(reader, 1); UserState state = (UserState)DbReaderUtils.GetInt32(reader, 2); DateTime? exp = DbReaderUtils.GetNullableDateTime(reader, 3); string name = DbReaderUtils.GetString(reader, 4); PostgresUser user = new PostgresUser(id, type, name, state); user.ExpiresAt = exp; return(user); }
//\"Id\", \"CatchEffortId\", \"TaxaSystemId\", \"TaxaId\", \"Count\", \"Description\" public FishCount Build(DbDataReader reader) { FishCount tmp = new FishCount(DbReaderUtils.GetGuid(reader, 0), new CompoundIdentity(Db.DataStoreIdentity, DbReaderUtils.GetGuid(reader, 1)), new CompoundIdentity(DbReaderUtils.GetGuid(reader, 2), DbReaderUtils.GetGuid(reader, 3)), (uint)DbReaderUtils.GetInt32(reader, 4), DbReaderUtils.GetString(reader, 5)); if (!seen.Contains(tmp.CatchEffortId)) { seen.Add(tmp.CatchEffortId); CatchEffort e = this.helperBuilder.Get(tmp.CatchEffortId); if (e != null) { got.Add(tmp.CatchEffortId); } } if (!got.Contains(tmp.CatchEffortId)) { return(null); } return(tmp); }