Skip to content

lillo42/cast-form

Repository files navigation

Cast Form

build NuGet

What is Cast Form?

Cast Form is a simple library built to solve problem to map an object to another.

How do I get started?

First, configure Cast Form to know the types you want to map, in the startup of your application:

var mapper = new MapperBuilder()
      .AddMapper<Foo, FooDto>()
      .AddMapper<Bar, BarDto>()
      .Build();

Then in your application code, execute the mappings:

var fooDto = mapper.Map<FooDto>(foo);
var barDto = mapper.Map<BarDto>(bar);

Where can I get it?

Via terminal:

dotnet add package CastForm

Via nuget, install NuGet. Then, install Cast Form from the package manager console:

PM> Install-Package CastForm

Current limitation

  • Not support expression

Do you have an issue?

You might want to know exactly what your mapping does at runtime.

If you're still running into problems, file an issue above.

License, etc.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct and contributors under the MIT license.