How to get the user id after registering an user in ASP .NET Core Identity

Getting back to work on my side project I got into finishing the user registration trough the API. Following the JSON API spec, it requires returning a 201 created and the resource id when creating a database entry. For somebody used with ASP this might seem trivial but it’s not that obvious when creating a new user. Let’s take a simple example: 1 2 3 4 5 6 var user = new ApplicationUser { UserName = model....

08 February, 2019 · 1 min · 149 words · Alexandru Bucur

The first rule of making #gulasch There is no such

The first rule of making There is no such thing as too much . The second rule of making gulasch There is no such thing as too much paprika.

08 February, 2019 · 1 min · 29 words · Alexandru Bucur

Doing some Chinese-ish dish. Rice noodles, chicken, zucchini, mushrooms, leek,

Doing some Chinese-ish dish. Rice noodles, chicken, zucchini, mushrooms, leek, and bell pepper.

07 February, 2019 · 1 min · 13 words · Alexandru Bucur

#pasta night. Beef and pork mix with tomato sauce and

night. Beef and pork mix with tomato sauce and touch of Greek yogurt. Going fancy with the full wheat grain pasta.

06 February, 2019 · 1 min · 21 words · Alexandru Bucur

Dumpling soup night again, I like it with the veggies

Dumpling soup night again, I like it with the veggies in.

29 January, 2019 · 1 min · 11 words · Alexandru Bucur

Leftovers night with bulgur, cuscus and millet, veggies and some

Leftovers night with bulgur, cuscus and millet, veggies and some ground beef sprinkled with curry. Looks a little ikky but otherwise good to eat

28 January, 2019 · 1 min · 24 words · Alexandru Bucur

Trying a vegan night #vegan #veganfood #homecooking #cooking #easycooking

Trying a vegan night food

27 January, 2019 · 1 min · 5 words · Alexandru Bucur

Dynamic Policy Claims in ASP.NET Core using JWT Tokens (and Role Claims)

Hi guys, as a developer I bet everybody is a little bit ’lazy’ and likes optimizing their workflow. My latest aha moment of laziness was when I was going trough my pet project and working on implementing Policy-based authorization and deciding that adding AddPolicy every single time I want to implement a new Role Claim in the database is counter intuitive. I want to say a big thank you to Jerrie Pelser for the initial work on this....

27 January, 2019 · 4 min · 711 words · Alexandru Bucur

Leftover bulgur and cuscus with lots of veggies #homecooking #cooking

Leftover bulgur and cuscus with lots of veggies

26 January, 2019 · 1 min · 8 words · Alexandru Bucur

Chicken filled with spinach, bell peppers and #mozzarella with #bulgur

Chicken filled with spinach, bell peppers and with on its side.

25 January, 2019 · 1 min · 11 words · Alexandru Bucur