I have a form with 3 inputs using tag helpers and a data transfer object with these 3 properties.

When I add the object to my database the values are empty. I set the properties to [Required] and even this doesn't give me an error.

I declared this as model in the form cshtml file:
@model CRM\_Collect.Dtos.ClientDto

Form:

```
<form asp-controller="Client" asp-action="AddClient" method="post">
<div class="form-group">
    <label for="companyName">Company</label>
    <input asp-for="Company" class="form-control" id="companyName" placeholder="Company name">
</div>
<div class="form-group">
    <label for="comment">Comment</label>
    <textarea asp-for="Comment" class="form-control" id="comment" rows="3"></textarea>
</div>
<div class="form-group">
    <label for="companyWebsite">Website</label>
    <input asp-for="Website" class="form-control" id="companyWebsite" placeholder="www.example.com">
</div>
<button type="submit" class="btn btn-primary">Submit</button>

```

Data transfer class

```
[Required]
    public String Company { get; set; }
    [Required]
    public String Website { get; set; }
    [Required]
    public String Comment { get; set; }

```

Post controller

```
    [HttpPost]
    public ActionResult AddClient(ClientDto client)
    {
        ClientContext clientContext = new ClientContext();

        Client clientToAdd = new Client { Comment = client.Comment, Company = client.Company, Website = client.Website };

        clientContext.Clients.Add(clientToAdd);
        clientContext.SaveChanges();

        return View();
    }

```