from Hacker News

Show HN: I built a .NET Core framework and need help

by controlledchaos on 1/3/21, 4:42 AM with 7 comments

Hey All,

I built an open-source .NET Core framework to try and make my job easier when it comes to building REST APIs off of existing databases. I'm looking for tips on how to properly document it, as well as ways to improve the class structure. Any help is appreciated.

https://github.com/evanirla/snacks-entity-core

I have also built a set of extension packages that handle things like Caching and Authorization.

Thanks!

  • by henryliang on 1/3/21, 6:37 AM

    I took a quick glance of your github codebase, I must say that you are reinventing wheels: for the purpose of Entity Modeling, you can use Entity Framework directly, or similar packages (Dapper, NHibernate...) For general common purpose library, you may refer to a really old library called Enterprise Library for standard .net framework. It provides a lot of common functionalities that can inspire you for build your library in .net core, or you may find someone else have already done one. BTW, this is my first comment ever. I used to programming in C# and .net for 10+ years but for the past 5 years I switch to javascript/typescript on Node.js and python.
  • by bob1029 on 1/3/21, 5:07 PM

    I agree with the points raised by another comment here. It appears you are doing a rewrite of Entity Framework. That said, you may have some specific requirements that justify this approach. Performance would be the most immediate one that comes to mind if you are planning on some domain-specific optimizations.

    Regardless, if you are looking for a good way to build documentation, look no further than DocFX:

    https://dotnet.github.io/docfx/index.html

    This is something that can be built-in to your CI/CD toolchain and automagically refresh your static HTML docs each time you make changes. All of your actual documentation can live in XML comments above the relevant code members throughout. This is intended to work in concert with the default VS comment style (3 slashes starts XML comment section).

  • by controlledchaos on 1/6/21, 2:58 PM

    After spending a few hours building an API using Entity Framework Core, and then another few trying to get Dapper.Contrib extensions to do what I need it to do without success. I gotta say Entity Framework Core takes the cake.