Answer the question
In order to leave comments, you need to log in
Need to separate entities from methods?
ASP.NET MVC application. Infrastructure layer.
There is a ConcreteRepository repository which has a GetConcreteData(inputData) method. Inside it is sending a PostRequest (url) request that receives data in JSON format from the microservice and maps this Json into an object of DataJson type.
Example:
public class ConcreteRepository
{
public ModelDto GetConcreteData(Model inputData)
{
var result = PostRequest<DataJson>(url);
...
return resultDto;
}
}
public class DataJson
{
public int _id {get;set;}
public string _name {get;set;}
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question