Asp.net core Api Architecture RRS feed

  • Question

  • User1838940990 posted

    Hi All,

    I need to start greenfield Api project .

    I am not a architect and don't have any experience with WebApi, 

    My experience is mainly  for the asp.net and console application and batch jobs and bit of support work for asp.net MVC.

    Since this project dont have any architect and team lead, I need to take care of all the aspects.

    The requirement is create a web Apiwhich can used in internal application and it should be exposed to external clients as well.

    Since its a new company I am going to join I don't  have any more details.

    Since .net core is getting established as a stable framework, planning to use .net core .

    Client has already told that they are using Azure for hosting and deployment.

    Can anybody suggest any reference for architecture for a asp.net web api  with the below details

    1, Authentication & Authorisation ? which one to use?, since this Api should need  exposed to outside 

    2, which pattern to for data access 

    3, which logging framework to use ? easy to configure and faster? 

    thanks in advance .

    Thursday, December 12, 2019 2:48 AM

All replies

  • User-1780421697 posted

    Authentication/Authorization: Identity Framework 4

    Data Access: Entity Framework Core

    Logging: Serilog .net core, ASP.Net Core already have built in logger you can just go with that as well.

    Thursday, December 12, 2019 3:51 AM
  • User1120430333 posted

    I can't speak on security.

    2, which pattern to for data access

    You may want to avoid the generic repository pattern, becuase the repository pattern is a domain pattern and not a data persistence pattern. And besides, the gerneric repository pattern is too generic and not flexible to change. You may want to look at the Data Access Object pattern using it with the Data Access Layer pattern

    3, which logging framework to use ? easy to configure and faster?

    You can use Serilog.

    You  also may want to look at global exception handling too.


    Thursday, December 12, 2019 7:35 AM