Good afternoon everyone I am learning ASP.NET Core 2.0 And get to a section where you create a class to use as a repository "Repositorium.AddResponse (Received Object)"
1-) What role does the repositories have for what they do?
2-) What function does the "AddRespose" () method do for it?
to be added to the Startup file in the "ConfigureServices" section
Please explain it in a simpler way, I have read the documentation and I still do not understand
public static class Repository
{
private static List<Estudiante> responses = new List<Estudiante>();
public static IEnumerable<Estudiante> Responses
{
get
{
return responses;
}
}
public static void AddResponse(Estudiante estudiante)
{
responses.Add(estudiante);
}
}
}