adding hidden basic asp.net core backend (#30)

Base functionality:

    DB
    email sending
    user registration & login
    storing new characters and reading them back

Notes:

    Functionality is "hidden" with no links pointing to it.
    Most pages are scaffolded and not reviewed at all :(
    local Dev db setup is pushed to git
    NO local email setup :(
This commit is contained in:
2023-12-19 19:03:57 +01:00
committed by GitHub
parent 19b002ff24
commit 7bb7ab6f13
154 changed files with 39394 additions and 1325 deletions
@@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
namespace Kemkas.Web.Db.Enums;
public static class TulajdonsagExtensions
{
public static Tulajdonsag Convert(string tulajdonsag)
{
return tulajdonsag switch
{
"t_ero" => Tulajdonsag.Ero,
"t_ugy" => Tulajdonsag.Ugyesseg,
"t_egs" => Tulajdonsag.Egeszseg,
"t_int" => Tulajdonsag.Intelligencia,
"t_bol" => Tulajdonsag.Bolcsesseg,
"t_kar" => Tulajdonsag.Karizma,
_ => throw new ValidationException("invalid tulajdonsag: " + tulajdonsag),
};
}
public static string Convert(this Tulajdonsag tulajdonsag)
{
return tulajdonsag switch
{
Tulajdonsag.Ero => "t_ero",
Tulajdonsag.Ugyesseg => "t_ugy",
Tulajdonsag.Egeszseg => "t_egs",
Tulajdonsag.Intelligencia => "t_int",
Tulajdonsag.Bolcsesseg => "t_bol",
Tulajdonsag.Karizma => "t_kar",
_ => throw new ValidationException("invalid tulajdonsag: " + tulajdonsag),
};
}
}