stevenknox / genericapi Goto Github PK
View Code? Open in Web Editor NEWGeneric WebAPI and Repository for AspNetCore
License: MIT License
Generic WebAPI and Repository for AspNetCore
License: MIT License
Enable Authorise attribute for Class or Method for All or Selected Controllers.
Currently API Get/Post/Put all work directly against the model.
We should provide the ability to specify an input and/or view model and have dynamic mapping to and from the domain model.
Suggested approach could be to follow convention over configuration and scan the registered assemblies for files suffixed with InputModel.cs or ViewModel.cs.
If a match for any of the files is found it will use those for Input and ViewModel rather than the Model itself.
We can possibly add a configure method to allow inclusion or exclusion of Models from this convention.
services.AddMvc()
`.AddGenericControllers(options =>
{
EntityAssembly = nameof(StoreWebApi);
UseViewModels = true;
UseInputModels = true;
});
app.ConfigureGenericControllers{
IgnoreViewModelsFor(Model.Orders)
}
Persistence is currently Entity Framework only however when registering services in Startup we should allow the option to select a persistence type such as Entity Framework, RavenDB, InMemory etc
Provide Sanitize attribute that can be enabled/disabled.
Service to Sanitize should be injectable from Startup.cs to allow use of any library such as Ganss.XSS
Child entities don't add or update when aggregate object is added to context.
Shouldnt need to inherit from a base class to avail of dynamic API's. Breaks Open/Closed principal.
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.