skip to Main Content

Insert a document to a MongoDB

I am trying to build a simple API connected to a MongoDB. I have customers and I want to add those to the DB This is my customer class: public class Customer : BaseCustomer { public Customer(string name, string surname,…

VIEW QUESTION

.NET 6 Service: how to pass JSON inside JSON?

I am developing a .NET 6 web service (with Startup), one of methods is public async Task<ActionResult> PutDirector([FromBody] Director director, CancellationToken cancellationToken) { var title = nameof(PutDirector); // .... } Using Swagger I pass this JSON: { "id": 2, "firstName":…

VIEW QUESTION
Back To Top
Search