yakimych / eggsandhoneywebapi Goto Github PK
View Code? Open in Web Editor NEWA Web API for the Eggs&Honey project written with ASP.NET Core and Entity Framework Core
License: MIT License
A Web API for the Eggs&Honey project written with ASP.NET Core and Entity Framework Core
License: MIT License
The idea is to have an in-memory version of the Web API available on Azure for testing different frontend solutions. Switching between a fake and real service implementation should be done via the application configuration.
Incorrect input should be handled via HTTP status codes
This applies both to obviously unsupported input (such as non-existent OrderType), as well as logically inconsequential requests (such as adding another order of the same type for the same user).
The functionality has been implemented directly in controller methods. Instead, an ActionFilter should be used for model validation and an ExceptionFilter should be used to map exception to error codes (rather than InternalServerError).
Apparently a blend of VS for Mac, VS for Windows and VS Code introduced some indentation issues.
NOTE: Strictly speaking this is overkill, the point of this application is rapid development (porting from node.js) and getting up and running in production. However, this is a good practice and is not extremely difficult to implement either.
So the service calls are to be async and should make use of EntityFramework async database calls.
This API is to be used by multiple test frontends from different servers, so CORS should be enabled API-wide
Exception handling scoped out from #5.
Considering to use middleware as in https://stackoverflow.com/questions/38630076/asp-net-core-web-api-exception-handling
Swashbuckle Swagger is an option worth looking into
The current implementation is fully functional in-memory, which is applicable for testing a frontend implementation. This should be replaced with actual database calls.
An SQL database should be created from the existing entities. Entity Framework Code First and Migrations to be used for database version handling
The Id is currently expected in the body of the request - should be moved to the URL for resolve/unresolve endpoints.
The users should only see the Name, OrderType and Date in the list
The admin needs the Ids for resolving/unresolving
This would require splitting the viewmodel classes into two - either by complicating the design via inheritance, or code repetition
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.