Skip to content

Installation & Setup

George Njeri (Swagfin) edited this page Jul 23, 2025 · 1 revision

📦 Installation & Setup

1. Install via NuGet

dotnet add package ObjectSemantics

Or via the NuGet Package Manager UI in Visual Studio.


2. Basic Setup

Define your model:

public class Student
{
    public string StudentName { get; set; }
    public int Age { get; set; }
}

Create a template and render it:

var student = new Student { StudentName = "Alice", Age = 22 };

var template = new ObjectSemanticsTemplate
{
    FileContents = "Student: {{ StudentName }}, Age: {{ Age }}"
};

string result = template.Map(student);
// Output: "Student: Alice, Age: 22"

Clone this wiki locally