HomeWork
Leg 01
Project proposal - https://courses.taltech.akaver.com/web-applications-with-csharp/assignments/home-assignments/project-proposal
Leg 02
DeadLine 2025-03-16 23:59:59
Culture support
https://courses.taltech.akaver.com/web-applications-with-csharp/lectures/i18n
Add support for language switching. Translate your current web UI and all entities (display, maxlength, etc. ) to at least 2 languages (your native + en).
Leg 03
DeadLine 2025-04-03 23:59:59
Update your code and documentation/erd (project proposal) to show how application user (and role) are connected to rest of your domain. How are m:m entities connected to user?
Implement base and app repositories.
Implement base and app UoW.
Replace dbcontext in all of your controllers with uow/repo (use dependecy injection.).
Leg 04
DeadLine 2025-04-20 23:59:59
Implement Account rest controller. User refresh token based approach. Test your implementation on some simple rest controller.
Methods to implement: Register, Login, Logout, TokenRefresh.
Leg 05
DeadLine 2025-04-24 23:59:59
DTO's and Mappers
Implement DTO's and Mappers in DAL layer and use them in your web/rest context.
Exclude appuser and domain metainfo from app layer.
Leg 06
DeadLine 2025-05-01 23:59:59
BLL's and Mappers
Implement BLL layer and mappers. And use them in your web/rest context.
REST Controllers
Add Api versioning and Open Api documentation generation. Add Swagger or some of it's newer cousins.
Add xml comments to your code.
Map rest outgoing data to versioned DTO's.
Decorate controllers with documnentation attributes.
namespace WebApp.ApiControllers
[ApiVersion( "1.0" )]
[Route("api/v{version:apiVersion}/[controller]")]
[ApiController]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
public class PersonsController : ControllerBase
{
/// <summary>
/// Get all persons for currently logged in user
/// </summary>
/// <returns>List of persons</returns>
[HttpGet]
[Produces( "application/json" )]
[ProducesResponseType( typeof( IEnumerable<App.DTO.v1.Person> ), 200 )]
[ProducesResponseType( 404 )]
public async Task<ActionResult<IEnumerable<App.DTO.v1.Person>>> GetPersons()
{
var data = (await _bll.PersonService.AllAsync(User.GetUserId())).ToList();
// TODO - add mapper
var res = data.Select(p => new App.DTO.v1.Person()
{
Id = p.Id,
PersonName = p.PersonName
}).ToList();
return res;
}