Repository navigation
Samples: FullStack and Csla take real schemas, template warnings, PLINQO fixes (dogfood round 4) - #725
Open
ejsmith wants to merge 21 commits into
Open
Samples: FullStack and Csla take real schemas, template warnings, PLINQO fixes (dogfood round 4)#725ejsmith wants to merge 21 commits into
ejsmith wants to merge 21 commits into
Conversation
…es on its records (From, ToEntity, ApplyTo, or a record's own name) keeps its name and the member gives way (FromEntity, CreateEntity, ApplyToEntity, TripResponseRecord: the API didn't compile, CS0102 and CS0542); a key's or a filter's parameter named like a C# or TypeScript keyword (debugger, eval, arguments) or like the endpoints' and the client's own names (db, request, entity, row, call, items, total, the UI's q) gets Value (a filter: Filter) after it, and a number where another column's has that name; and the kit's form reads its maps' own entries, so a field named constructor or valueOf isn't shown as wrong from the start
… (CSG0007, at the template's line): LookupEnums' table with no rows (the C#'s #warning, which only a build showed, is a comment now, as the TypeScript's was), and Csla's web app from a database it isn't wired for, when it writes Program.cs, which keeps its #warning at the line to change for whoever builds it
…mbers, file-scoped namespaces, init, nameof and interpolated or raw strings in attributes; VB's auto-implemented properties and attributes without _), whose Metadata attributes Entities.cst copies as written; 8.x read them as C# 3 and VB 9 only
…ken from (the provider's Name, which a snapshot's provider gives as the one it was taken with, not its type, SnapshotSchemaProvider)
… map what each database's provider can't take as it is, and as EF Core's scaffolding writes it: PostgreSQL's timestamp, bit(n) and enums get their column types (an enum's parameters its type), timestamptz is written as UTC, a bit(1) is a bool and MySQL's DATE and TIME are DateOnly and TimeOnly through converters; a column's default is HasDefaultValue or HasDefaultValueSql, with a value type's literal default as its sentinel; a table's own key to itself is named for its column (Parent, InverseParent); Exclude leaves tables out of the entities, configurations and DbContext (sysdiagrams and __EFMigrationsHistory by default, as the scaffolding does); and an entity's configuration gives way to a table's entity of that name (ProductEntityConfiguration)
… map what each database's provider can't take as it is, and as EF Core's scaffolding writes it: PostgreSQL's timestamp, bit(n) and enums get their column types (an enum's parameters its type), timestamptz is written as UTC, a bit(1) is a bool and MySQL's DATE and TIME are DateOnly and TimeOnly through converters; a column's default is HasDefaultValue or HasDefaultValueSql, with a value type's literal default as its sentinel; a table's own key to itself is named for its column (Parent, InverseParent); Exclude leaves tables out of the entities, configurations and DbContext (sysdiagrams and __EFMigrationsHistory by default, as the scaffolding does); and an entity's configuration gives way to a table's entity of that name (ProductEntityConfiguration)
… as written, not only its attributes: the attributes with the #if lines around them and the comments between them, and the declaration (?, init, required, =>, an initializer), at the class's indentation (CodeFileParser.GetSection with an indentation), so a #nullable enable file builds without new CS8618 warnings and a debug-only attribute stays debug-only; a new column's member is written as 8.x wrote it, an 8.x file comes out the same, and the WARNING comment is indented as the members are (8.x: one space more, which dotnet format changed back on every run)
…nString", DeleteOnNull="false") before saving it, as the generator does for a dbml it reads, so a new project's first generate writes what the second does and cs check right after it is up to date (8.x added them on the second run)
…d InclusionMode, which its Entity.cst doesn't have (their code is commented out), so it generates without two warnings on every run
…t generating again keeps: each member as written, #if lines around its attributes, the file's indentation; what it doesn't) and links to the migration guide's framework templates in CI, in place of Readme.url, whose page is gone; the Legacy README says the generated code builds with the .NET SDK anywhere and runs on Windows
… so they agree: an acronym is in capitals (IsVip: VIP, SKU, ID), a bool's label leaves out its Is, Desc stays Desc (a sort's direction as often as a description), and Csla spells out what FullStack did (Ship address 1, not Ship addr 1)
…ties.cst remove the files their last run listed in Files.txt that this one doesn't write (RemoveOutput), so a dropped table's record, entity and configuration go, and cs check reports them; they stayed and still compiled into the app
…gs text of 0s and 1s, enums and MySQL SETs selects the API checks (CS_EnumValues); a column with a default may be left out of a new row; the search escapes with ! (MySQL's ESCAPE '\' was a syntax error) and a failed one says so; a key's last text column is a catch-all and the UI's fallback takes every path; a row is shown by a unique text column and a foreign key not named for its table by its column; a table named like a generated type makes that type give way; one Exclude for every output; timestamptz in the browser's time; warnings for what it can't do, and a README that says what's supported and how to use your own database
…s undo can copy (MobileList) and a list field, bit(n) a string of 0s and 1s, enums a select (a SET check boxes), a key a route has no type for (MySQL's unsigned keys) is parsed by its page, a junction table's parent is the table its key starts with (in column order, the same from every database), a type made for a table gives way to another table's of that name (ProductReadOnlyInfo), Exclude leaves a table out of the EF Core layer too, a page that fails logs it and says why the database refused (with its words in Development), generating warns about what the app does differently, and the README's "Your own database" lists every step, with a "Supported, and not" table
…r its connection names (or its file) unless its project sets them; the sample's project no longer sets PetShop and PetShop.db3, which it showed for any database
…base (PostgreSQL's timestamp, bit and enums, timestamptz as UTC, MySQL's DATE and TIME, defaults and their sentinels), how a self-reference is named, and Exclude
# Conflicts: # Templates/Database/ModernEntities/Entities.cst # Templates/Web/FullStack/Entities.cst
…n create even when the row sends null (EF Core can't tell null from left out); an update sets it to null after
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Samples for Generator PR #22. Merge this one first: #22 points Samples at its head.
Dogfood round 4 (2026-11-26)
timestamp,bit(n)and enum columns get their store types (an enum's parameter typed as the enum), andtimestamptzis written as UTC.bit(1)column is a bool.HasDefaultValue/HasDefaultValueSql.Parent/InverseParent.sysdiagramsand__EFMigrationsHistoryby default).ProductEntityConfiguration).bit(n)is text of 0s and 1s.!, so MySQL search works, and a failed search shows a toast..and/work.Recordsuffix.FullStack.csp.example.tsnames no table, and warnings say what the app does instead.MobileLists.NameWords.Labelkeeps acronyms (VIP, SKU, ID) and leavesDescas written.Entities.cstand TableToClass'sRecords.cstremove the files of tables that are gone.Dbml.cstsaves the dbml with its defaults filled in, socs checkpasses right after the first generate..cspno longer warns.README.mdreplacesReadme.url.Earlier in this PR
From→FromEntity, …), and keyword-named keys getValue.CodeTemplate.Warning(CSG0007).Verified by Generator's suite: the sample-output tests build the generated apps against each database.