From 0108fc084ab138c4e5555f0e0e7800247ff43615 Mon Sep 17 00:00:00 2001
From: Ali Yousefi <ali.visual.studio@gmail.com>
Date: Sat, 16 Sep 2023 12:50:52 +0330
Subject: [PATCH] Update README.md

---
 README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 46 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 48060e8..7bea44e 100644
--- a/README.md
+++ b/README.md
@@ -24,14 +24,54 @@ Install packages:
    
    [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-YamlDotNet-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.YamlDotNet/) ![Badge](https://img.shields.io/badge/Text-8A2BE2)
 
- Example:
+Startup:
 
 ```csharp
-            builder.Services.AddSerialization(o => 
-            { 
-                o.UseBinaryGo(); 
-                o.UseNewtonsoftJson(); 
-            });
+public class Startup
+{
+    //...
+    
+    public void ConfigureServices(IServiceCollection services)
+    {
+        //configuration
+        services.AddSerialization(o => 
+        { 
+            o.UseBinaryGo(); 
+            o.UseNewtonsoftJson(); 
+        }); 
+    }    
+}
 ```
+Usage:
 
+```csharp
+
+using Common.Models;
+using EasyMicroservices.Serialization.Interfaces;
+using Microsoft.AspNetCore.Mvc;
+
+[Route("api/[controller]")]
+[ApiController]
+public class DIController : ControllerBase
+{
+    private readonly IBinarySerializationProvider _binarySerialization;
+    private readonly ITextSerializationProvider _textSerialization;
+
+    public DIController(IBinarySerializationProvider binarySerialization, ITextSerializationProvider textSerialization)
+    {
+        _binarySerialization = binarySerialization;
+        _textSerialization = textSerialization;
+    }
+
+    [Route("Serialize")]
+    [HttpGet]
+    public IActionResult Serialize()
+    {
+        Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" };
+        var result = _textSerialization.Serialize(model);
+        var binary = _binarySerialization.Serialize(model);
+        return Ok(result);
+    }
+}
+```
 [![Line Coverage Status](./src/CSharp/coverage-badge-line.svg)](https://github.com/danpetitt/open-cover-badge-generator-action/)