Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
.NET 7.0 (C#)

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

Description

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

Submitted by MK - 8 months ago (Last modified 8 months ago)