Problem : I was writing API in .NET Core 3.1. The API's exported list of custom classes for [httpget] methods from controller. I used Postman for testing the API's. And observed that from code the list of classes were returned correctly but it were always coming as empty entries in Post man result window. Solution : The class was returning list as Action result. The native data types like int or string lists were working fine. On further debugging I noticed that the class members were declared public. The get and set modifiers were missing from the class. After adding the get and set methods to the data members of the class. For example: The following code was not working // GET: api/<Controller> [HttpGet("Sample/Run")] public async Task<ActionResult> Sampletest() { var result = await _datafromDB.GetDaataFromDB(); ...
We will develop an app that can host online exam. It will have the feature to register user, allow the user to log in. Dashboard for creating sample tests. The code is shared in GIT hub repository https://github.com/ SwagatikaGoswami/ OnlineExamApp.git The database is MySQL database. The server is a WEB API .NET Core service that uses entity framework for DB operations. The client is a web assembly blazor application. The password stored in the database is encrypted. Register window is as follows. It checks for the mandatory fields. The log in page is as follows: The admin dashboard after logging in The admin dashboard when new test button is clicked. It uses a Blazor component for adding new test samples.