Bundle: redb / redb.Examples (redb.Examples.txt), 385 files
Snapshot: development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Index: https://redbase.app/src/dev-2026-12-06/redb/_index.txt
====
Path: redb/redb.Examples/Ef/CommandCounters.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/CommandCounters.cs
----
using System.Data.Common;
using System.Diagnostics;
using Microsoft.EntityFrameworkCore.Diagnostics;
using redb.Core.Diagnostics;
namespace redb.Examples.Ef;
///
/// Counts database round trips on both sides of the comparison, so the table can show how many commands
/// each library sent for the same task. The runner reads the counter before and after an example.
///
internal static class CommandCounters
{
private static long _redb;
private static long _ef;
private static ActivityListener? _redbListener;
/// Commands redb has sent so far.
public static long Redb => Interlocked.Read(ref _redb);
/// Commands EF Core has sent so far.
public static long Ef => Interlocked.Read(ref _ef);
///
/// Starts counting redb commands. redb declares every database command as an activity on
/// ; the listener only counts them and asks for no tags.
///
public static void StartRedb()
{
if (_redbListener != null)
return;
_redbListener = new ActivityListener
{
ShouldListenTo = source => source.Name == RedbActivitySource.SourceName,
Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.PropagationData,
ActivityStarted = _ => Interlocked.Increment(ref _redb)
};
ActivitySource.AddActivityListener(_redbListener);
}
/// Interceptor that counts every command EF Core executes; one instance for all contexts.
public static readonly DbCommandInterceptor EfInterceptor = new EfCommandCounter();
private sealed class EfCommandCounter : DbCommandInterceptor
{
public override InterceptionResult ReaderExecuting(
DbCommand command, CommandEventData eventData, InterceptionResult result)
{
Interlocked.Increment(ref _ef);
return result;
}
public override ValueTask> ReaderExecutingAsync(
DbCommand command, CommandEventData eventData, InterceptionResult result,
CancellationToken cancellationToken = default)
{
Interlocked.Increment(ref _ef);
return ValueTask.FromResult(result);
}
public override InterceptionResult ScalarExecuting(
DbCommand command, CommandEventData eventData, InterceptionResult result)
{
Interlocked.Increment(ref _ef);
return result;
}
public override ValueTask> ScalarExecutingAsync(
DbCommand command, CommandEventData eventData, InterceptionResult result,
CancellationToken cancellationToken = default)
{
Interlocked.Increment(ref _ef);
return ValueTask.FromResult(result);
}
public override InterceptionResult NonQueryExecuting(
DbCommand command, CommandEventData eventData, InterceptionResult result)
{
Interlocked.Increment(ref _ef);
return result;
}
public override ValueTask> NonQueryExecutingAsync(
DbCommand command, CommandEventData eventData, InterceptionResult result,
CancellationToken cancellationToken = default)
{
Interlocked.Increment(ref _ef);
return ValueTask.FromResult(result);
}
}
}
Path: redb/redb.Examples/Ef/DepartmentEfMapping.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/DepartmentEfMapping.cs
----
using Microsoft.EntityFrameworkCore;
using redb.Core.Models.Entities;
using redb.Examples.Ef.Entities;
using Biz = redb.Examples.Models;
namespace redb.Examples.Ef;
///
/// The department tree of the examples through EF Core: a node is a header row in objects (its parent in
/// _id_parent ) with a DepartmentProps row, turned into the redb
/// hands out. EF has no recursive query and no depth parameter, so its twins cover the operations on one level:
/// create, delete, move, count, roots, leaves and direct children.
///
internal static class DepartmentEfMapping
{
/// A new node under (a root when null). Keys come from the database.
public static objects ToEntity(string name, string code, string description, decimal budget, objects? parent)
{
var now = DateTime.UtcNow;
return new objects
{
_id_scheme = EfSchemeIds.Department,
_id_owner = 0,
_id_who_change = 0,
_date_create = now,
_date_modify = now,
_name = name,
_id_parentNavigation = parent,
DepartmentProps = new DepartmentProps
{
Name = name,
Code = code,
Description = description,
Budget = budget,
IsActive = true
}
};
}
/// Every department node with its header, as a query.
public static IQueryable Nodes(this FlatContext db) => db.DepartmentProps.Include(d => d.objects);
/// The business object of a loaded department node, without parent or children.
public static TreeRedbObject ToBusiness(DepartmentProps d)
{
var h = d.objects;
return new TreeRedbObject
{
id = h._id,
parent_id = h._id_parent,
scheme_id = h._id_scheme,
owner_id = h._id_owner,
who_change_id = h._id_who_change,
date_create = h._date_create,
date_modify = h._date_modify,
date_begin = h._date_begin,
date_complete = h._date_complete,
key = h._key,
name = h._name,
note = h._note,
value_long = h._value_long,
value_string = h._value_string,
value_guid = h._value_guid,
value_bool = h._value_bool,
value_double = h._value_double,
value_numeric = h._value_numeric,
value_datetime = h._value_datetime,
value_bytes = h._value_bytes,
Props = new Biz.DepartmentProps
{
Name = d.Name ?? string.Empty,
Code = d.Code ?? string.Empty,
Description = d.Description ?? string.Empty,
IsActive = d.IsActive ?? false,
Budget = d.Budget ?? 0m
}
};
}
}
Path: redb/redb.Examples/Ef/EfSchemeIds.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/EfSchemeIds.cs
----
namespace redb.Examples.Ef;
///
/// Values written to objects._id_scheme by the EF twins. An EF application has no redb schemes, but
/// the column needs a value; a fixed one per Props type keeps rows of different types apart in the shared
/// header table. A header without Props (a plain object) gets .
///
internal static class EfSchemeIds
{
public const long None = 0;
public const long Employee = 1;
public const long ProjectMetrics = 2;
public const long Department = 3;
public const long City = 4;
public const long Person = 5;
}
Path: redb/redb.Examples/Ef/EmployeeEfGraph.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/EmployeeEfGraph.cs
----
using Microsoft.EntityFrameworkCore;
using redb.Core.Models.Entities;
using redb.Examples.Ef.Entities;
using Biz = redb.Examples.Models;
namespace redb.Examples.Ef;
///
/// Reading an employee through EF Core as redb hands it out: the whole object, header and every nested
/// class, array and dictionary, turned into of the business class.
///
internal static class EmployeeEfGraph
{
///
/// The query with every part of the employee included. Split into one SQL statement per collection:
/// a single statement would multiply the rows of independent collections (skills times contacts
/// times offices and so on).
///
public static IQueryable WithGraph(this IQueryable query) => query
.Include(e => e.objects)
.Include(e => e.EmployeeProps_Skills)
.Include(e => e.EmployeeProps_SkillLevels)
.Include(e => e.EmployeeProps_Certifications)
.Include(e => e.EmployeeProps_CertificationYears)
.Include(e => e.EmployeeProps_PastProjects)
.Include(e => e.EmployeeProps_HomeAddress!).ThenInclude(a => a.EmployeeProps_HomeAddress_Building!).ThenInclude(b => b.EmployeeProps_HomeAddress_Building_Amenities)
.Include(e => e.EmployeeProps_HomeAddress!).ThenInclude(a => a.EmployeeProps_HomeAddress_Building!).ThenInclude(b => b.EmployeeProps_HomeAddress_Building_AccessCodes)
.Include(e => e.EmployeeProps_HomeAddress!).ThenInclude(a => a.EmployeeProps_HomeAddress_Building!).ThenInclude(b => b.EmployeeProps_HomeAddress_Building_ParkingSpots)
.Include(e => e.EmployeeProps_HomeAddress!).ThenInclude(a => a.EmployeeProps_HomeAddress_Building!).ThenInclude(b => b.EmployeeProps_HomeAddress_Building_ElevatorFloors)
.Include(e => e.EmployeeProps_WorkAddress!).ThenInclude(a => a.EmployeeProps_WorkAddress_Building!).ThenInclude(b => b.EmployeeProps_WorkAddress_Building_Amenities)
.Include(e => e.EmployeeProps_WorkAddress!).ThenInclude(a => a.EmployeeProps_WorkAddress_Building!).ThenInclude(b => b.EmployeeProps_WorkAddress_Building_AccessCodes)
.Include(e => e.EmployeeProps_WorkAddress!).ThenInclude(a => a.EmployeeProps_WorkAddress_Building!).ThenInclude(b => b.EmployeeProps_WorkAddress_Building_ParkingSpots)
.Include(e => e.EmployeeProps_WorkAddress!).ThenInclude(a => a.EmployeeProps_WorkAddress_Building!).ThenInclude(b => b.EmployeeProps_WorkAddress_Building_ElevatorFloors)
.Include(e => e.EmployeeProps_EmergencyAddress!).ThenInclude(a => a.EmployeeProps_EmergencyAddress_Building!).ThenInclude(b => b.EmployeeProps_EmergencyAddress_Building_Amenities)
.Include(e => e.EmployeeProps_EmergencyAddress!).ThenInclude(a => a.EmployeeProps_EmergencyAddress_Building!).ThenInclude(b => b.EmployeeProps_EmergencyAddress_Building_AccessCodes)
.Include(e => e.EmployeeProps_EmergencyAddress!).ThenInclude(a => a.EmployeeProps_EmergencyAddress_Building!).ThenInclude(b => b.EmployeeProps_EmergencyAddress_Building_ParkingSpots)
.Include(e => e.EmployeeProps_EmergencyAddress!).ThenInclude(a => a.EmployeeProps_EmergencyAddress_Building!).ThenInclude(b => b.EmployeeProps_EmergencyAddress_Building_ElevatorFloors)
.Include(e => e.EmployeeProps_Contacts).ThenInclude(c => c.EmployeeProps_Contacts_NotificationHours)
.Include(e => e.EmployeeProps_Contacts).ThenInclude(c => c.EmployeeProps_Contacts_Metadata)
.Include(e => e.EmployeeProps_PhoneDirectory)
.Include(e => e.EmployeeProps_BonusByYear)
.Include(e => e.EmployeeProps_ProjectMetrics)
.Include(e => e.EmployeeProps_PerformanceReviews)
.Include(e => e.EmployeeProps_OfficeLocations).ThenInclude(o => o.EmployeeProps_OfficeLocations_Building!).ThenInclude(b => b.EmployeeProps_OfficeLocations_Building_Amenities)
.Include(e => e.EmployeeProps_OfficeLocations).ThenInclude(o => o.EmployeeProps_OfficeLocations_Building!).ThenInclude(b => b.EmployeeProps_OfficeLocations_Building_AccessCodes)
.Include(e => e.EmployeeProps_OfficeLocations).ThenInclude(o => o.EmployeeProps_OfficeLocations_Building!).ThenInclude(b => b.EmployeeProps_OfficeLocations_Building_ParkingSpots)
.Include(e => e.EmployeeProps_OfficeLocations).ThenInclude(o => o.EmployeeProps_OfficeLocations_Building!).ThenInclude(b => b.EmployeeProps_OfficeLocations_Building_ElevatorFloors)
.Include(e => e.EmployeeProps_DepartmentHistory).ThenInclude(d => d.EmployeeProps_DepartmentHistory_Projects)
.Include(e => e.EmployeeProps_DepartmentHistory).ThenInclude(d => d.EmployeeProps_DepartmentHistory_Leaders)
.Include(e => e.EmployeeProps_DepartmentHistory).ThenInclude(d => d.EmployeeProps_DepartmentHistory_BudgetByYear)
.AsSplitQuery();
/// Runs the query and turns every employee into the business object.
public static async Task>> ToBusinessListAsync(this IQueryable query) =>
(await query.ToListAsync()).Select(ToBusiness).ToList();
///
/// The business object of a loaded employee, as redb returns it. References to other objects
/// (RedbObject<ProjectMetricsProps> ) carry the target id only: the seeded data has none,
/// and loading their targets would be one more include chain.
///
public static RedbObject ToBusiness(EmployeeProps e)
{
var h = e.objects;
return new RedbObject
{
id = h._id,
parent_id = h._id_parent,
scheme_id = h._id_scheme,
owner_id = h._id_owner,
who_change_id = h._id_who_change,
date_create = h._date_create,
date_modify = h._date_modify,
date_begin = h._date_begin,
date_complete = h._date_complete,
key = h._key,
name = h._name,
note = h._note,
value_long = h._value_long,
value_string = h._value_string,
value_guid = h._value_guid,
value_bool = h._value_bool,
value_double = h._value_double,
value_numeric = h._value_numeric,
value_datetime = h._value_datetime,
value_bytes = h._value_bytes,
Props = new Biz.EmployeeProps
{
FirstName = e.FirstName ?? string.Empty,
LastName = e.LastName ?? string.Empty,
Age = e.Age ?? 0,
HireDate = e.HireDate ?? default,
Position = e.Position ?? string.Empty,
Salary = e.Salary ?? 0m,
Department = e.Department ?? string.Empty,
EmployeeCode = e.EmployeeCode,
Skills = Elements(e.EmployeeProps_Skills, x => x._idx, x => x._value!),
SkillLevels = Elements(e.EmployeeProps_SkillLevels, x => x._idx, x => x._value ?? 0),
Certifications = Elements(e.EmployeeProps_Certifications, x => x._idx, x => x._value!),
CertificationYears = Elements(e.EmployeeProps_CertificationYears, x => x._idx, x => x._value ?? 0),
HomeAddress = e.EmployeeProps_HomeAddress is not { } home ? null : Address(home.City, home.Street,
home.EmployeeProps_HomeAddress_Building is not { } b ? null : Building(b.Floor, b.Name,
Elements(b.EmployeeProps_HomeAddress_Building_Amenities, x => x._idx, x => x._value!),
Elements(b.EmployeeProps_HomeAddress_Building_AccessCodes, x => x._idx, x => x._value ?? 0),
Elements(b.EmployeeProps_HomeAddress_Building_ParkingSpots, x => x._idx, x => x._value!),
Elements(b.EmployeeProps_HomeAddress_Building_ElevatorFloors, x => x._idx, x => x._value ?? 0))),
WorkAddress = e.EmployeeProps_WorkAddress is not { } work ? null : Address(work.City, work.Street,
work.EmployeeProps_WorkAddress_Building is not { } wb ? null : Building(wb.Floor, wb.Name,
Elements(wb.EmployeeProps_WorkAddress_Building_Amenities, x => x._idx, x => x._value!),
Elements(wb.EmployeeProps_WorkAddress_Building_AccessCodes, x => x._idx, x => x._value ?? 0),
Elements(wb.EmployeeProps_WorkAddress_Building_ParkingSpots, x => x._idx, x => x._value!),
Elements(wb.EmployeeProps_WorkAddress_Building_ElevatorFloors, x => x._idx, x => x._value ?? 0))),
EmergencyAddress = e.EmployeeProps_EmergencyAddress is not { } emergency ? null : Address(emergency.City, emergency.Street,
emergency.EmployeeProps_EmergencyAddress_Building is not { } eb ? null : Building(eb.Floor, eb.Name,
Elements(eb.EmployeeProps_EmergencyAddress_Building_Amenities, x => x._idx, x => x._value!),
Elements(eb.EmployeeProps_EmergencyAddress_Building_AccessCodes, x => x._idx, x => x._value ?? 0),
Elements(eb.EmployeeProps_EmergencyAddress_Building_ParkingSpots, x => x._idx, x => x._value!),
Elements(eb.EmployeeProps_EmergencyAddress_Building_ElevatorFloors, x => x._idx, x => x._value ?? 0))),
Contacts = Elements(e.EmployeeProps_Contacts, x => x._idx, c => new Biz.Contact
{
Type = c.Type ?? string.Empty,
Value = c.Value ?? string.Empty,
IsVerified = c.IsVerified ?? false,
NotificationHours = Elements(c.EmployeeProps_Contacts_NotificationHours, x => x._idx, x => x._value ?? 0),
Metadata = Elements(c.EmployeeProps_Contacts_Metadata, x => x._idx,
m => new Biz.ContactDetail { Label = m.Label ?? string.Empty, Value = m.Value ?? string.Empty })
}),
CurrentProject = e.CurrentProject is { } projectId ? new RedbObject { id = projectId } : null,
PastProjects = Elements(e.EmployeeProps_PastProjects, x => x._idx,
x => new RedbObject { id = x._value ?? 0 }),
PhoneDirectory = Entries(e.EmployeeProps_PhoneDirectory, x => x._key, x => x._value!),
BonusByYear = Entries(e.EmployeeProps_BonusByYear, x => x._key, x => x._value ?? 0m),
ProjectMetrics = Entries(e.EmployeeProps_ProjectMetrics, x => x._key,
x => new RedbObject { id = x._value ?? 0 }),
PerformanceReviews = Entries(e.EmployeeProps_PerformanceReviews,
x => (x._key_Item1, x._key_Item2), x => x._value!),
OfficeLocations = Entries(e.EmployeeProps_OfficeLocations, x => x._key, o => Address(o.City, o.Street,
o.EmployeeProps_OfficeLocations_Building is not { } ob ? null : Building(ob.Floor, ob.Name,
Elements(ob.EmployeeProps_OfficeLocations_Building_Amenities, x => x._idx, x => x._value!),
Elements(ob.EmployeeProps_OfficeLocations_Building_AccessCodes, x => x._idx, x => x._value ?? 0),
Elements(ob.EmployeeProps_OfficeLocations_Building_ParkingSpots, x => x._idx, x => x._value!),
Elements(ob.EmployeeProps_OfficeLocations_Building_ElevatorFloors, x => x._idx, x => x._value ?? 0)))),
DepartmentHistory = Entries(e.EmployeeProps_DepartmentHistory, x => x._key, d => new Biz.Department
{
Name = d.Name ?? string.Empty,
HeadCount = d.HeadCount ?? 0,
Projects = Elements(d.EmployeeProps_DepartmentHistory_Projects, x => x._idx, x => x._value!) ?? [],
Leaders = Elements(d.EmployeeProps_DepartmentHistory_Leaders, x => x._idx,
t => new Biz.Tag { Name = t.Name ?? string.Empty, Priority = t.Priority ?? 0, Description = t.Description }) ?? [],
BudgetByYear = Entries(d.EmployeeProps_DepartmentHistory_BudgetByYear, x => x._key, x => x._value ?? 0)
})
}
};
}
private static Biz.Address Address(string? city, string? street, Biz.BuildingInfo? building) => new()
{
City = city ?? string.Empty,
Street = street ?? string.Empty,
Building = building
};
private static Biz.BuildingInfo Building(int? floor, string? name, string[]? amenities, int[]? accessCodes,
string[]? parkingSpots, int[]? elevatorFloors) => new()
{
Floor = floor ?? 0,
Name = name ?? string.Empty,
Amenities = amenities,
AccessCodes = accessCodes,
ParkingSpots = parkingSpots,
ElevatorFloors = elevatorFloors
};
///
/// The array of a collection table in element order. No rows read as null: the flat model cannot tell
/// an empty array from a missing one, and redb leaves a missing array null.
///
private static TValue[]? Elements(ICollection rows, Func index, Func value) =>
rows.Count == 0 ? null : rows.OrderBy(index).Select(value).ToArray();
/// The dictionary of a collection table; no rows read as null, as with arrays.
private static Dictionary? Entries(ICollection rows, Func key, Func value)
where TKey : notnull =>
rows.Count == 0 ? null : rows.ToDictionary(key, value);
}
Path: redb/redb.Examples/Ef/EmployeeEfMapping.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/EmployeeEfMapping.cs
----
using redb.Core.Models.Entities;
using redb.Examples.Ef.Entities;
using Biz = redb.Examples.Models;
namespace redb.Examples.Ef;
///
/// Turns the business class into the EF entity graph of the flat tables.
///
/// This is the code an EF application writes by hand to get its business class in and out of the
/// database: one entity per flat table, a list per array and dictionary, a reference per nested class.
/// redb does the same from the Props class alone. The mapping is part of every EF measurement.
///
///
internal static class EmployeeEfMapping
{
///
/// The header row of a new employee with its Props attached. Keys are left unset: the database hands
/// them out from the flat sequence, and EF copies the header key into the Props row.
///
public static objects ToEntity(RedbObject source)
{
var props = source.Props ?? throw new ArgumentException("An employee without Props.", nameof(source));
var now = DateTime.UtcNow;
return new objects
{
_id_scheme = EfSchemeIds.Employee,
// The system user, as redb writes it for objects saved without a user (owner_id 0).
_id_owner = 0,
_id_who_change = 0,
_date_create = now,
_date_modify = now,
_name = source.Name,
EmployeeProps = ToEntity(props)
};
}
private static EmployeeProps ToEntity(Biz.EmployeeProps p) => new()
{
FirstName = p.FirstName,
LastName = p.LastName,
Age = p.Age,
// The reading redb stores: the clock value marked UTC (DateTimeConverter.NormalizeForStorage).
HireDate = DateTime.SpecifyKind(p.HireDate, DateTimeKind.Utc),
Position = p.Position,
Salary = p.Salary,
Department = p.Department,
EmployeeCode = p.EmployeeCode,
CurrentProject = p.CurrentProject?.Id,
EmployeeProps_Skills = Items(p.Skills, (i, v) => new EmployeeProps_Skills { _idx = i, _value = v }),
EmployeeProps_SkillLevels = Items(p.SkillLevels, (i, v) => new EmployeeProps_SkillLevels { _idx = i, _value = v }),
EmployeeProps_Certifications = Items(p.Certifications, (i, v) => new EmployeeProps_Certifications { _idx = i, _value = v }),
EmployeeProps_CertificationYears = Items(p.CertificationYears, (i, v) => new EmployeeProps_CertificationYears { _idx = i, _value = v }),
EmployeeProps_HomeAddress = HomeAddress(p.HomeAddress),
EmployeeProps_WorkAddress = WorkAddress(p.WorkAddress),
EmployeeProps_EmergencyAddress = EmergencyAddress(p.EmergencyAddress),
EmployeeProps_Contacts = Items(p.Contacts, (i, c) => new EmployeeProps_Contacts
{
_idx = i,
Type = c.Type,
Value = c.Value,
IsVerified = c.IsVerified,
EmployeeProps_Contacts_NotificationHours = Items(c.NotificationHours,
(j, v) => new EmployeeProps_Contacts_NotificationHours { _idx = j, _value = v }),
EmployeeProps_Contacts_Metadata = Items(c.Metadata,
(j, m) => new EmployeeProps_Contacts_Metadata { _idx = j, Label = m.Label, Value = m.Value })
}),
EmployeeProps_PastProjects = Items(p.PastProjects, (i, o) => new EmployeeProps_PastProjects { _idx = i, _value = o?.Id }),
EmployeeProps_PhoneDirectory = Entries(p.PhoneDirectory, (k, v) => new EmployeeProps_PhoneDirectory { _key = k, _value = v }),
EmployeeProps_BonusByYear = Entries(p.BonusByYear, (k, v) => new EmployeeProps_BonusByYear { _key = k, _value = v }),
EmployeeProps_ProjectMetrics = Entries(p.ProjectMetrics, (k, o) => new EmployeeProps_ProjectMetrics { _key = k, _value = o?.Id }),
EmployeeProps_PerformanceReviews = Entries(p.PerformanceReviews, (k, v) => new EmployeeProps_PerformanceReviews
{
_key_Item1 = k.Year,
_key_Item2 = k.Quarter,
_value = v
}),
EmployeeProps_OfficeLocations = Entries(p.OfficeLocations, (k, a) => new EmployeeProps_OfficeLocations
{
_key = k,
City = a?.City,
Street = a?.Street,
EmployeeProps_OfficeLocations_Building = OfficeBuilding(a?.Building)
}),
EmployeeProps_DepartmentHistory = Entries(p.DepartmentHistory, (k, d) => new EmployeeProps_DepartmentHistory
{
_key = k,
Name = d?.Name,
HeadCount = d?.HeadCount,
EmployeeProps_DepartmentHistory_Projects = Items(d?.Projects,
(i, v) => new EmployeeProps_DepartmentHistory_Projects { _idx = i, _value = v }),
EmployeeProps_DepartmentHistory_Leaders = Items(d?.Leaders,
(i, t) => new EmployeeProps_DepartmentHistory_Leaders { _idx = i, Name = t.Name, Priority = t.Priority, Description = t.Description }),
EmployeeProps_DepartmentHistory_BudgetByYear = Entries(d?.BudgetByYear,
(y, v) => new EmployeeProps_DepartmentHistory_BudgetByYear { _key = y, _value = v })
})
};
// Every place an Address appears is a table of its own in the flat model, so each one needs its own
// copy of the same code.
private static EmployeeProps_HomeAddress? HomeAddress(Biz.Address? a) => a == null ? null : new()
{
City = a.City,
Street = a.Street,
EmployeeProps_HomeAddress_Building = a.Building is not { } b ? null : new()
{
Floor = b.Floor,
Name = b.Name,
EmployeeProps_HomeAddress_Building_Amenities = Items(b.Amenities, (i, v) => new EmployeeProps_HomeAddress_Building_Amenities { _idx = i, _value = v }),
EmployeeProps_HomeAddress_Building_AccessCodes = Items(b.AccessCodes, (i, v) => new EmployeeProps_HomeAddress_Building_AccessCodes { _idx = i, _value = v }),
EmployeeProps_HomeAddress_Building_ParkingSpots = Items(b.ParkingSpots, (i, v) => new EmployeeProps_HomeAddress_Building_ParkingSpots { _idx = i, _value = v }),
EmployeeProps_HomeAddress_Building_ElevatorFloors = Items(b.ElevatorFloors, (i, v) => new EmployeeProps_HomeAddress_Building_ElevatorFloors { _idx = i, _value = v })
}
};
private static EmployeeProps_WorkAddress? WorkAddress(Biz.Address? a) => a == null ? null : new()
{
City = a.City,
Street = a.Street,
EmployeeProps_WorkAddress_Building = a.Building is not { } b ? null : new()
{
Floor = b.Floor,
Name = b.Name,
EmployeeProps_WorkAddress_Building_Amenities = Items(b.Amenities, (i, v) => new EmployeeProps_WorkAddress_Building_Amenities { _idx = i, _value = v }),
EmployeeProps_WorkAddress_Building_AccessCodes = Items(b.AccessCodes, (i, v) => new EmployeeProps_WorkAddress_Building_AccessCodes { _idx = i, _value = v }),
EmployeeProps_WorkAddress_Building_ParkingSpots = Items(b.ParkingSpots, (i, v) => new EmployeeProps_WorkAddress_Building_ParkingSpots { _idx = i, _value = v }),
EmployeeProps_WorkAddress_Building_ElevatorFloors = Items(b.ElevatorFloors, (i, v) => new EmployeeProps_WorkAddress_Building_ElevatorFloors { _idx = i, _value = v })
}
};
private static EmployeeProps_EmergencyAddress? EmergencyAddress(Biz.Address? a) => a == null ? null : new()
{
City = a.City,
Street = a.Street,
EmployeeProps_EmergencyAddress_Building = a.Building is not { } b ? null : new()
{
Floor = b.Floor,
Name = b.Name,
EmployeeProps_EmergencyAddress_Building_Amenities = Items(b.Amenities, (i, v) => new EmployeeProps_EmergencyAddress_Building_Amenities { _idx = i, _value = v }),
EmployeeProps_EmergencyAddress_Building_AccessCodes = Items(b.AccessCodes, (i, v) => new EmployeeProps_EmergencyAddress_Building_AccessCodes { _idx = i, _value = v }),
EmployeeProps_EmergencyAddress_Building_ParkingSpots = Items(b.ParkingSpots, (i, v) => new EmployeeProps_EmergencyAddress_Building_ParkingSpots { _idx = i, _value = v }),
EmployeeProps_EmergencyAddress_Building_ElevatorFloors = Items(b.ElevatorFloors, (i, v) => new EmployeeProps_EmergencyAddress_Building_ElevatorFloors { _idx = i, _value = v })
}
};
private static EmployeeProps_OfficeLocations_Building? OfficeBuilding(Biz.BuildingInfo? b) => b == null ? null : new()
{
Floor = b.Floor,
Name = b.Name,
EmployeeProps_OfficeLocations_Building_Amenities = Items(b.Amenities, (i, v) => new EmployeeProps_OfficeLocations_Building_Amenities { _idx = i, _value = v }),
EmployeeProps_OfficeLocations_Building_AccessCodes = Items(b.AccessCodes, (i, v) => new EmployeeProps_OfficeLocations_Building_AccessCodes { _idx = i, _value = v }),
EmployeeProps_OfficeLocations_Building_ParkingSpots = Items(b.ParkingSpots, (i, v) => new EmployeeProps_OfficeLocations_Building_ParkingSpots { _idx = i, _value = v }),
EmployeeProps_OfficeLocations_Building_ElevatorFloors = Items(b.ElevatorFloors, (i, v) => new EmployeeProps_OfficeLocations_Building_ElevatorFloors { _idx = i, _value = v })
};
/// One row per array element, its position in _idx ; no rows for a null array.
private static List Items(IEnumerable? values, Func make) =>
values?.Select((value, index) => make(index, value)).ToList() ?? [];
/// One row per dictionary entry; no rows for a null dictionary.
private static List Entries(IDictionary? values, Func make)
where TKey : notnull =>
values?.Select(entry => make(entry.Key, entry.Value)).ToList() ?? [];
}
Path: redb/redb.Examples/Ef/Entities/CityProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/CityProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class CityProps
{
public long _id { get; set; }
public string? Name { get; set; }
public int? Population { get; set; }
public string? Region { get; set; }
public bool? IsCapital { get; set; }
public virtual ICollection CityProps_Coordinates { get; set; } = new List();
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/CityProps_Coordinates.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/CityProps_Coordinates.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class CityProps_Coordinates
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public double? _value { get; set; }
public virtual CityProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/DepartmentProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/DepartmentProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class DepartmentProps
{
public long _id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public bool? IsActive { get; set; }
public decimal? Budget { get; set; }
public string? Code { get; set; }
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps
{
public long _id { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public int? Age { get; set; }
public DateTime? HireDate { get; set; }
public string? Position { get; set; }
public decimal? Salary { get; set; }
public string? Department { get; set; }
public string? EmployeeCode { get; set; }
public long? CurrentProject { get; set; }
public virtual ProjectMetricsProps? CurrentProjectNavigation { get; set; }
public virtual ICollection EmployeeProps_BonusByYear { get; set; } = new List();
public virtual ICollection EmployeeProps_CertificationYears { get; set; } = new List();
public virtual ICollection EmployeeProps_Certifications { get; set; } = new List();
public virtual ICollection EmployeeProps_Contacts { get; set; } = new List();
public virtual ICollection EmployeeProps_DepartmentHistory { get; set; } = new List();
public virtual EmployeeProps_EmergencyAddress? EmployeeProps_EmergencyAddress { get; set; }
public virtual EmployeeProps_HomeAddress? EmployeeProps_HomeAddress { get; set; }
public virtual ICollection EmployeeProps_OfficeLocations { get; set; } = new List();
public virtual ICollection EmployeeProps_PastProjects { get; set; } = new List();
public virtual ICollection EmployeeProps_PerformanceReviews { get; set; } = new List();
public virtual ICollection EmployeeProps_PhoneDirectory { get; set; } = new List();
public virtual ICollection EmployeeProps_ProjectMetrics { get; set; } = new List();
public virtual ICollection EmployeeProps_SkillLevels { get; set; } = new List();
public virtual ICollection EmployeeProps_Skills { get; set; } = new List();
public virtual EmployeeProps_WorkAddress? EmployeeProps_WorkAddress { get; set; }
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_BonusByYear.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_BonusByYear.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_BonusByYear
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _key { get; set; }
public decimal? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_CertificationYears.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_CertificationYears.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_CertificationYears
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_Certifications.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_Certifications.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_Certifications
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_Contacts
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? Type { get; set; }
public string? Value { get; set; }
public bool? IsVerified { get; set; }
public virtual ICollection EmployeeProps_Contacts_Metadata { get; set; } = new List();
public virtual ICollection EmployeeProps_Contacts_NotificationHours { get; set; } = new List();
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts_Metadata.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts_Metadata.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_Contacts_Metadata
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? Label { get; set; }
public string? Value { get; set; }
public virtual EmployeeProps_Contacts _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts_NotificationHours.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_Contacts_NotificationHours.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_Contacts_NotificationHours
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_Contacts _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_DepartmentHistory
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public string? Name { get; set; }
public int? HeadCount { get; set; }
public virtual ICollection EmployeeProps_DepartmentHistory_BudgetByYear { get; set; } = new List();
public virtual ICollection EmployeeProps_DepartmentHistory_Leaders { get; set; } = new List();
public virtual ICollection EmployeeProps_DepartmentHistory_Projects { get; set; } = new List();
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_BudgetByYear.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_BudgetByYear.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_DepartmentHistory_BudgetByYear
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public int? _value { get; set; }
public virtual EmployeeProps_DepartmentHistory _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_Leaders.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_Leaders.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_DepartmentHistory_Leaders
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? Name { get; set; }
public int? Priority { get; set; }
public string? Description { get; set; }
public virtual EmployeeProps_DepartmentHistory _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_Projects.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_DepartmentHistory_Projects.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_DepartmentHistory_Projects
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_DepartmentHistory _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string? City { get; set; }
public string? Street { get; set; }
public virtual EmployeeProps_EmergencyAddress_Building? EmployeeProps_EmergencyAddress_Building { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress_Building
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int? Floor { get; set; }
public string? Name { get; set; }
public virtual ICollection EmployeeProps_EmergencyAddress_Building_AccessCodes { get; set; } = new List();
public virtual ICollection EmployeeProps_EmergencyAddress_Building_Amenities { get; set; } = new List();
public virtual ICollection EmployeeProps_EmergencyAddress_Building_ElevatorFloors { get; set; } = new List();
public virtual ICollection EmployeeProps_EmergencyAddress_Building_ParkingSpots { get; set; } = new List();
public virtual EmployeeProps_EmergencyAddress _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_AccessCodes.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_AccessCodes.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress_Building_AccessCodes
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_EmergencyAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_Amenities.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_Amenities.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress_Building_Amenities
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_EmergencyAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_ElevatorFloors.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_ElevatorFloors.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress_Building_ElevatorFloors
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_EmergencyAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_ParkingSpots.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_EmergencyAddress_Building_ParkingSpots.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_EmergencyAddress_Building_ParkingSpots
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_EmergencyAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string? City { get; set; }
public string? Street { get; set; }
public virtual EmployeeProps_HomeAddress_Building? EmployeeProps_HomeAddress_Building { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress_Building
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int? Floor { get; set; }
public string? Name { get; set; }
public virtual ICollection EmployeeProps_HomeAddress_Building_AccessCodes { get; set; } = new List();
public virtual ICollection EmployeeProps_HomeAddress_Building_Amenities { get; set; } = new List();
public virtual ICollection EmployeeProps_HomeAddress_Building_ElevatorFloors { get; set; } = new List();
public virtual ICollection EmployeeProps_HomeAddress_Building_ParkingSpots { get; set; } = new List();
public virtual EmployeeProps_HomeAddress _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_AccessCodes.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_AccessCodes.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress_Building_AccessCodes
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_HomeAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_Amenities.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_Amenities.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress_Building_Amenities
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_HomeAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_ElevatorFloors.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_ElevatorFloors.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress_Building_ElevatorFloors
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_HomeAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_ParkingSpots.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_HomeAddress_Building_ParkingSpots.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_HomeAddress_Building_ParkingSpots
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_HomeAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public string? City { get; set; }
public string? Street { get; set; }
public virtual EmployeeProps_OfficeLocations_Building? EmployeeProps_OfficeLocations_Building { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations_Building
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int? Floor { get; set; }
public string? Name { get; set; }
public virtual ICollection EmployeeProps_OfficeLocations_Building_AccessCodes { get; set; } = new List();
public virtual ICollection EmployeeProps_OfficeLocations_Building_Amenities { get; set; } = new List();
public virtual ICollection EmployeeProps_OfficeLocations_Building_ElevatorFloors { get; set; } = new List();
public virtual ICollection EmployeeProps_OfficeLocations_Building_ParkingSpots { get; set; } = new List();
public virtual EmployeeProps_OfficeLocations _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_AccessCodes.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_AccessCodes.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations_Building_AccessCodes
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_OfficeLocations_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_Amenities.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_Amenities.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations_Building_Amenities
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_OfficeLocations_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_ElevatorFloors.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_ElevatorFloors.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations_Building_ElevatorFloors
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_OfficeLocations_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_ParkingSpots.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_OfficeLocations_Building_ParkingSpots.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_OfficeLocations_Building_ParkingSpots
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_OfficeLocations_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_PastProjects.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_PastProjects.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_PastProjects
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public long? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
public virtual ProjectMetricsProps? _valueNavigation { get; set; }
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_PerformanceReviews.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_PerformanceReviews.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_PerformanceReviews
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _key_Item1 { get; set; }
public string _key_Item2 { get; set; } = null!;
public string? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_PhoneDirectory.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_PhoneDirectory.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_PhoneDirectory
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public string? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_ProjectMetrics.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_ProjectMetrics.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_ProjectMetrics
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public long? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
public virtual ProjectMetricsProps? _valueNavigation { get; set; }
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_SkillLevels.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_SkillLevels.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_SkillLevels
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_Skills.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_Skills.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_Skills
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string? City { get; set; }
public string? Street { get; set; }
public virtual EmployeeProps_WorkAddress_Building? EmployeeProps_WorkAddress_Building { get; set; }
public virtual EmployeeProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress_Building
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int? Floor { get; set; }
public string? Name { get; set; }
public virtual ICollection EmployeeProps_WorkAddress_Building_AccessCodes { get; set; } = new List();
public virtual ICollection EmployeeProps_WorkAddress_Building_Amenities { get; set; } = new List();
public virtual ICollection EmployeeProps_WorkAddress_Building_ElevatorFloors { get; set; } = new List();
public virtual ICollection EmployeeProps_WorkAddress_Building_ParkingSpots { get; set; } = new List();
public virtual EmployeeProps_WorkAddress _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_AccessCodes.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_AccessCodes.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress_Building_AccessCodes
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_WorkAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_Amenities.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_Amenities.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress_Building_Amenities
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_WorkAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_ElevatorFloors.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_ElevatorFloors.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress_Building_ElevatorFloors
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public int? _value { get; set; }
public virtual EmployeeProps_WorkAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_ParkingSpots.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/EmployeeProps_WorkAddress_Building_ParkingSpots.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class EmployeeProps_WorkAddress_Building_ParkingSpots
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual EmployeeProps_WorkAddress_Building _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/ExampleResultProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/ExampleResultProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class ExampleResultProps
{
public long _id { get; set; }
public string? Tier { get; set; }
public virtual ICollection ExampleResultProps_Results { get; set; } = new List();
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/ExampleResultProps_Results.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/ExampleResultProps_Results.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class ExampleResultProps_Results
{
public long _id { get; set; }
public long _owner_id { get; set; }
public string _key { get; set; } = null!;
public int? Count { get; set; }
public int? Time { get; set; }
public string? Status { get; set; }
public virtual ExampleResultProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/PersonProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/PersonProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class PersonProps
{
public long _id { get; set; }
public string? Name { get; set; }
public int? Age { get; set; }
public string? Email { get; set; }
public long? Status { get; set; }
public virtual ICollection PersonProps_Roles { get; set; } = new List();
public virtual list_items? StatusNavigation { get; set; }
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/PersonProps_Roles.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/PersonProps_Roles.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class PersonProps_Roles
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public long? _value { get; set; }
public virtual PersonProps _owner { get; set; } = null!;
public virtual list_items? _valueNavigation { get; set; }
}
Path: redb/redb.Examples/Ef/Entities/ProjectMetricsProps.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/ProjectMetricsProps.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class ProjectMetricsProps
{
public long _id { get; set; }
public long? ProjectId { get; set; }
public long? TasksCompleted { get; set; }
public long? TasksTotal { get; set; }
public long? BugsFixed { get; set; }
public double? Budget { get; set; }
public long? TeamSize { get; set; }
public virtual ICollection EmployeeProps { get; set; } = new List();
public virtual ICollection EmployeeProps_PastProjects { get; set; } = new List();
public virtual ICollection EmployeeProps_ProjectMetrics { get; set; } = new List();
public virtual ICollection ProjectMetricsProps_Tags { get; set; } = new List();
public virtual ICollection ProjectMetricsProps_Technologies { get; set; } = new List();
public virtual objects objects { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/ProjectMetricsProps_Tags.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/ProjectMetricsProps_Tags.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class ProjectMetricsProps_Tags
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? Name { get; set; }
public int? Priority { get; set; }
public string? Description { get; set; }
public virtual ProjectMetricsProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/ProjectMetricsProps_Technologies.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/ProjectMetricsProps_Technologies.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class ProjectMetricsProps_Technologies
{
public long _id { get; set; }
public long _owner_id { get; set; }
public int _idx { get; set; }
public string? _value { get; set; }
public virtual ProjectMetricsProps _owner { get; set; } = null!;
}
Path: redb/redb.Examples/Ef/Entities/list_items.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/list_items.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class list_items
{
public long _id { get; set; }
public long _id_list { get; set; }
public string? _value { get; set; }
public string? _alias { get; set; }
public long? _id_object { get; set; }
public virtual ICollection PersonProps { get; set; } = new List();
public virtual ICollection PersonProps_Roles { get; set; } = new List();
public virtual lists _id_listNavigation { get; set; } = null!;
public virtual objects? _id_objectNavigation { get; set; }
}
Path: redb/redb.Examples/Ef/Entities/lists.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/lists.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class lists
{
public long _id { get; set; }
public string _name { get; set; } = null!;
public string? _alias { get; set; }
public virtual ICollection list_items { get; set; } = new List();
}
Path: redb/redb.Examples/Ef/Entities/objects.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/Entities/objects.cs
----
using System;
using System.Collections.Generic;
namespace redb.Examples.Ef.Entities;
public partial class objects
{
public long _id { get; set; }
public long? _id_parent { get; set; }
public long _id_scheme { get; set; }
public long _id_owner { get; set; }
public long _id_who_change { get; set; }
public DateTime _date_create { get; set; }
public DateTime _date_modify { get; set; }
public DateTime? _date_begin { get; set; }
public DateTime? _date_complete { get; set; }
public long? _key { get; set; }
public string? _name { get; set; }
public string? _note { get; set; }
public long? _value_long { get; set; }
public string? _value_string { get; set; }
public Guid? _value_guid { get; set; }
public bool? _value_bool { get; set; }
public double? _value_double { get; set; }
public decimal? _value_numeric { get; set; }
public DateTime? _value_datetime { get; set; }
public byte[]? _value_bytes { get; set; }
public virtual CityProps? CityProps { get; set; }
public virtual DepartmentProps? DepartmentProps { get; set; }
public virtual EmployeeProps? EmployeeProps { get; set; }
public virtual ExampleResultProps? ExampleResultProps { get; set; }
public virtual ICollection Inverse_id_parentNavigation { get; set; } = new List();
public virtual PersonProps? PersonProps { get; set; }
public virtual ProjectMetricsProps? ProjectMetricsProps { get; set; }
public virtual objects? _id_parentNavigation { get; set; }
public virtual ICollection list_items { get; set; } = new List();
}
Path: redb/redb.Examples/Ef/FlatContext.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Examples/Ef/FlatContext.cs
----
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using redb.Examples.Ef.Entities;
namespace redb.Examples.Ef;
public partial class FlatContext : DbContext
{
public FlatContext(DbContextOptions options)
: base(options)
{
}
public virtual DbSet CityProps { get; set; }
public virtual DbSet CityProps_Coordinates { get; set; }
public virtual DbSet DepartmentProps { get; set; }
public virtual DbSet EmployeeProps { get; set; }
public virtual DbSet EmployeeProps_BonusByYear { get; set; }
public virtual DbSet EmployeeProps_CertificationYears { get; set; }
public virtual DbSet EmployeeProps_Certifications { get; set; }
public virtual DbSet EmployeeProps_Contacts { get; set; }
public virtual DbSet EmployeeProps_Contacts_Metadata { get; set; }
public virtual DbSet EmployeeProps_Contacts_NotificationHours { get; set; }
public virtual DbSet EmployeeProps_DepartmentHistory { get; set; }
public virtual DbSet EmployeeProps_DepartmentHistory_BudgetByYear { get; set; }
public virtual DbSet EmployeeProps_DepartmentHistory_Leaders { get; set; }
public virtual DbSet EmployeeProps_DepartmentHistory_Projects { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress_Building { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress_Building_AccessCodes { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress_Building_Amenities { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress_Building_ElevatorFloors { get; set; }
public virtual DbSet EmployeeProps_EmergencyAddress_Building_ParkingSpots { get; set; }
public virtual DbSet EmployeeProps_HomeAddress { get; set; }
public virtual DbSet EmployeeProps_HomeAddress_Building { get; set; }
public virtual DbSet EmployeeProps_HomeAddress_Building_AccessCodes { get; set; }
public virtual DbSet EmployeeProps_HomeAddress_Building_Amenities { get; set; }
public virtual DbSet EmployeeProps_HomeAddress_Building_ElevatorFloors { get; set; }
public virtual DbSet EmployeeProps_HomeAddress_Building_ParkingSpots { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations_Building { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations_Building_AccessCodes { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations_Building_Amenities { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations_Building_ElevatorFloors { get; set; }
public virtual DbSet EmployeeProps_OfficeLocations_Building_ParkingSpots { get; set; }
public virtual DbSet EmployeeProps_PastProjects { get; set; }
public virtual DbSet EmployeeProps_PerformanceReviews { get; set; }
public virtual DbSet EmployeeProps_PhoneDirectory { get; set; }
public virtual DbSet EmployeeProps_ProjectMetrics { get; set; }
public virtual DbSet EmployeeProps_SkillLevels { get; set; }
public virtual DbSet EmployeeProps_Skills { get; set; }
public virtual DbSet EmployeeProps_WorkAddress { get; set; }
public virtual DbSet EmployeeProps_WorkAddress_Building { get; set; }
public virtual DbSet EmployeeProps_WorkAddress_Building_AccessCodes { get; set; }
public virtual DbSet EmployeeProps_WorkAddress_Building_Amenities { get; set; }
public virtual DbSet EmployeeProps_WorkAddress_Building_ElevatorFloors { get; set; }
public virtual DbSet EmployeeProps_WorkAddress_Building_ParkingSpots { get; set; }
public virtual DbSet ExampleResultProps { get; set; }
public virtual DbSet ExampleResultProps_Results { get; set; }
public virtual DbSet PersonProps { get; set; }
public virtual DbSet PersonProps_Roles { get; set; }
public virtual DbSet ProjectMetricsProps { get; set; }
public virtual DbSet ProjectMetricsProps_Tags { get; set; }
public virtual DbSet ProjectMetricsProps_Technologies { get; set; }
public virtual DbSet list_items { get; set; }
public virtual DbSet lists { get; set; }
public virtual DbSet objects { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.HasOne(d => d.objects).WithOne(p => p.CityProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_CityProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("CityProps.Coordinates");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_CityProps.Coordinates").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.CityProps_Coordinates)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_CityProps.Coordinates__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.Property(e => e.Budget).HasPrecision(38, 18);
entity.HasOne(d => d.objects).WithOne(p => p.DepartmentProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_DepartmentProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.Property(e => e.Salary).HasPrecision(38, 18);
entity.HasOne(d => d.CurrentProjectNavigation).WithMany(p => p.EmployeeProps)
.HasForeignKey(d => d.CurrentProject)
.HasConstraintName("FK_EmployeeProps_CurrentProject");
entity.HasOne(d => d.objects).WithOne(p => p.EmployeeProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_EmployeeProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.BonusByYear");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.BonusByYear").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.Property(e => e._value).HasPrecision(38, 18);
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_BonusByYear)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.BonusByYear__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.CertificationYears");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.CertificationYears").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_CertificationYears)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.CertificationYears__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.Certifications");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.Certifications").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_Certifications)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.Certifications__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.Contacts");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.Contacts").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_Contacts)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.Contacts__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.Contacts.Metadata");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.Contacts.Metadata").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_Contacts_Metadata)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.Contacts.Metadata__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.Contacts.NotificationHours");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.Contacts.NotificationHours").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_Contacts_NotificationHours)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.Contacts.NotificationHours__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.DepartmentHistory");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.DepartmentHistory").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_DepartmentHistory)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.DepartmentHistory__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.DepartmentHistory.BudgetByYear");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.DepartmentHistory.BudgetByYear").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_DepartmentHistory_BudgetByYear)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.DepartmentHistory.BudgetByYear__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.DepartmentHistory.Leaders");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.DepartmentHistory.Leaders").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_DepartmentHistory_Leaders)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.DepartmentHistory.Leaders__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.DepartmentHistory.Projects");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.DepartmentHistory.Projects").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_DepartmentHistory_Projects)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.DepartmentHistory.Projects__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.EmergencyAddress").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_EmergencyAddress)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress.Building");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.EmergencyAddress.Building").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_EmergencyAddress_Building)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress.Building__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress.Building.AccessCodes");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.EmergencyAddress.Building.AccessCodes").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_EmergencyAddress_Building_AccessCodes)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress.Building.AccessCodes~20cad047");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress.Building.Amenities");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.EmergencyAddress.Building.Amenities").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_EmergencyAddress_Building_Amenities)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress.Building.Amenities__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress.Building.ElevatorFloors");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.EmergencyAddress.Building.ElevatorFloors").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_EmergencyAddress_Building_ElevatorFloors)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress.Building.ElevatorFlo~50707330");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.EmergencyAddress.Building.ParkingSpots");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.EmergencyAddress.Building.ParkingSpots").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_EmergencyAddress_Building_ParkingSpots)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.EmergencyAddress.Building.ParkingSpot~7c1178eb");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.HomeAddress").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_HomeAddress)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress.Building");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.HomeAddress.Building").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_HomeAddress_Building)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress.Building__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress.Building.AccessCodes");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.HomeAddress.Building.AccessCodes").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_HomeAddress_Building_AccessCodes)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress.Building.AccessCodes__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress.Building.Amenities");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.HomeAddress.Building.Amenities").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_HomeAddress_Building_Amenities)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress.Building.Amenities__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress.Building.ElevatorFloors");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.HomeAddress.Building.ElevatorFloors").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_HomeAddress_Building_ElevatorFloors)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress.Building.ElevatorFloors__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.HomeAddress.Building.ParkingSpots");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.HomeAddress.Building.ParkingSpots").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_HomeAddress_Building_ParkingSpots)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.HomeAddress.Building.ParkingSpots__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.OfficeLocations").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_OfficeLocations)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations.Building");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.OfficeLocations.Building").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_OfficeLocations_Building)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations.Building__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations.Building.AccessCodes");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.OfficeLocations.Building.AccessCodes").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_OfficeLocations_Building_AccessCodes)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations.Building.AccessCodes__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations.Building.Amenities");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.OfficeLocations.Building.Amenities").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_OfficeLocations_Building_Amenities)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations.Building.Amenities__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations.Building.ElevatorFloors");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.OfficeLocations.Building.ElevatorFloors").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_OfficeLocations_Building_ElevatorFloors)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations.Building.ElevatorFloo~6445e391");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.OfficeLocations.Building.ParkingSpots");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.OfficeLocations.Building.ParkingSpots").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_OfficeLocations_Building_ParkingSpots)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.OfficeLocations.Building.ParkingSpots~439995bd");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.PastProjects");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.PastProjects").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_PastProjects)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.PastProjects__owner_id");
entity.HasOne(d => d._valueNavigation).WithMany(p => p.EmployeeProps_PastProjects)
.HasForeignKey(d => d._value)
.HasConstraintName("FK_EmployeeProps.PastProjects__value");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.PerformanceReviews");
entity.HasIndex(e => new { e._owner_id, e._key_Item1, e._key_Item2 }, "UQ_EmployeeProps.PerformanceReviews").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_PerformanceReviews)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.PerformanceReviews__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.PhoneDirectory");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.PhoneDirectory").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_PhoneDirectory)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.PhoneDirectory__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.ProjectMetrics");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_EmployeeProps.ProjectMetrics").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_ProjectMetrics)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.ProjectMetrics__owner_id");
entity.HasOne(d => d._valueNavigation).WithMany(p => p.EmployeeProps_ProjectMetrics)
.HasForeignKey(d => d._value)
.HasConstraintName("FK_EmployeeProps.ProjectMetrics__value");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.SkillLevels");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.SkillLevels").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_SkillLevels)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.SkillLevels__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.Skills");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.Skills").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_Skills)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.Skills__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.WorkAddress").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_WorkAddress)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress.Building");
entity.HasIndex(e => e._owner_id, "UQ_EmployeeProps.WorkAddress.Building").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithOne(p => p.EmployeeProps_WorkAddress_Building)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress.Building__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress.Building.AccessCodes");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.WorkAddress.Building.AccessCodes").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_WorkAddress_Building_AccessCodes)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress.Building.AccessCodes__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress.Building.Amenities");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.WorkAddress.Building.Amenities").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_WorkAddress_Building_Amenities)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress.Building.Amenities__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress.Building.ElevatorFloors");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.WorkAddress.Building.ElevatorFloors").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_WorkAddress_Building_ElevatorFloors)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress.Building.ElevatorFloors__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("EmployeeProps.WorkAddress.Building.ParkingSpots");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_EmployeeProps.WorkAddress.Building.ParkingSpots").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.EmployeeProps_WorkAddress_Building_ParkingSpots)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_EmployeeProps.WorkAddress.Building.ParkingSpots__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.HasOne(d => d.objects).WithOne(p => p.ExampleResultProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_ExampleResultProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("ExampleResultProps.Results");
entity.HasIndex(e => new { e._owner_id, e._key }, "UQ_ExampleResultProps.Results").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.ExampleResultProps_Results)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_ExampleResultProps.Results__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.HasOne(d => d.StatusNavigation).WithMany(p => p.PersonProps)
.HasForeignKey(d => d.Status)
.HasConstraintName("FK_PersonProps_Status");
entity.HasOne(d => d.objects).WithOne(p => p.PersonProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_PersonProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("PersonProps.Roles");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_PersonProps.Roles").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.PersonProps_Roles)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_PersonProps.Roles__owner_id");
entity.HasOne(d => d._valueNavigation).WithMany(p => p.PersonProps_Roles)
.HasForeignKey(d => d._value)
.HasConstraintName("FK_PersonProps.Roles__value");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.Property(e => e._id).ValueGeneratedNever();
entity.HasOne(d => d.objects).WithOne(p => p.ProjectMetricsProps)
.HasForeignKey(d => d._id)
.HasConstraintName("FK_ProjectMetricsProps__id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("ProjectMetricsProps.Tags");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_ProjectMetricsProps.Tags").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.ProjectMetricsProps_Tags)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_ProjectMetricsProps.Tags__owner_id");
});
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e._id);
entity.ToTable("ProjectMetricsProps.Technologies");
entity.HasIndex(e => new { e._owner_id, e._idx }, "UQ_ProjectMetricsProps.Technologies").IsUnique();
entity.Property(e => e._id).HasDefaultValueSql("nextval('flat_identity'::regclass)");
entity.HasOne(d => d._owner).WithMany(p => p.ProjectMetricsProps_Technologies)
.HasForeignKey(d => d._owner_id)
.HasConstraintName("FK_ProjectMetricsProps.Technologies__owner_id");
});
modelBuilder.Entity