FluentBuilder
v0.0.10-preview-03Pre-release
.NETStandard2.0
This project uses Source Generation to create a FluentBuilder for a specified model or DTO.
Published
Aug 8, 2021
5y ago
Total Downloads
215.7K
215,672
Install
dotnet add package FluentBuilder --version 0.0.10-preview-03
| Product | Versions |
|---|---|
| .NET Standard |
README
Usage
Annotate
Annotate a class with [FluentBuilder.AutoGenerateBuilder] to indicate that a FluentBuilder should be generated for this class:
[FluentBuilder.AutoGenerateBuilder]
public class User
{
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime? Date { get; set; }
}
Use FluentBuilder
using System;
namespace Test
{
class Program
{
static void Main(string[] args)
{
var user = new FluentBuilder.UserBuilder()
.WithFirstName("Test")
.WithLastName("User")
.Build();
Console.WriteLine($"{user.FirstName} {user.LastName}");
}
}
}
Changes from Previous Version
No structural changes between v0.0.10-preview-02 and v0.0.10-preview-03.
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.