-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Michał Stolarz edited this page Nov 12, 2021
·
33 revisions
- https://jasonwatmore.com/post/2021/05/25/net-5-simple-api-for-authentication-registration-and-user-management
- https://medium.com/jspoint/so-what-the-heck-is-jwt-or-json-web-token-dca8bcb719a6
- https://www.c-sharpcorner.com/article/authentication-and-authorization-in-asp-net-core-web-api-with-json-web-tokens/
- https://codewithmukesh.com/blog/aspnet-core-api-with-jwt-authentication/
- https://dev.to/moe23/asp-net-core-5-rest-api-authentication-with-jwt-step-by-step-140d
- https://weblog.west-wind.com/posts/2021/Mar/09/Role-based-JWT-Tokens-in-ASPNET-Core
- Roles
https://codewithmukesh.com/blog/user-management-in-aspnet-core-mvc/
- Adding migration
dotnet ef migrations add "" -p Persistence/ -s API/ - Relationships
https://docs.microsoft.com/en-us/ef/core/modeling/relationships?tabs=fluent-api%2Cfluent-api-simple-key%2Csimple-key - One-to-One relation
https://www.entityframeworktutorial.net/efcore/one-to-one-conventions-entity-framework-core.aspx - Bogus - seeding random fake data
https://github.com/bchavez/Bogus - AutoMapper - ProjectTo
https://docs.automapper.org/en/stable/Queryable-Extensions.html
Password Regex (8 characters, small and big, numeric and special)
^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$
- Exception Middleware
https://stackoverflow.com/questions/61879407/how-to-handle-rest-exceptions-in-cqrs - FluentValidation library (use FluentValidation.AspNetCore on NuGet)
https://fluentvalidation.net/ - Class with Regex
https://github.com/30james00/SwiezeBackend/blob/master/Application/Core/MyCustomValidators.cs - Regex 101
https://regexr.com/
- Intro to Unit Testing in C# using XUnit
https://www.youtube.com/watch?v=DwbYxP-etMY - Mocking in C# Unit Tests - How To Test Data Access Code and More
https://www.youtube.com/watch?v=DwbYxP-etMY - .NET 5 REST API Tutorial 10 - Unit Testing and TDD
https://www.youtube.com/watch?v=dsD0CMgPjUk - https://www.iaspnetcore.com/blog/blogpost/58f39c6784cd4533a415a69a
- DbContext / DbSet Mock for Unit Test in C# with Moq
https://medium.com/@briangoncalves/dbcontext-dbset-mock-for-unit-test-in-c-with-moq-db5c270e68f3
There's no need to test Create Command validation because it's done by FluentValidation on controller level.