Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-05-08 08:34
Updated·2024-05-08 08:38
Flavor·.NET 7.0 (C#)

@"
modelBuilder\.Entity<(?'type'\w+)>\(builder =>\n\s*\{(?'builder'[\w\W]+?)\}\);
"
gm
Open regex in editor

Description

This expression converts a modelbuilder to an IEntityTypeConfiguration<T> class. Useful for tidying up the result of a scaffold operation.

Submitted by MK