Ilaro.Admin creates for you admin panel using only POCO classes.
Demo - using Northwind DB (with small modifications, removed multiple primary keys)
Project was inspired by Django admin site.
Please keep in mind this is still an alpha version.
Get it from nuget:
If you are using Unity install:
Install-Package Ilaro.Admin.Unity
Or if you using Ninject install:
Install-Package Ilaro.Admin.Ninject
Or you can just install:
Install-Package Ilaro.Admin
And register by yourself all needed stuff.
I don't plan milestones, so I will do things in random order. Maybe some of them I'll skip, and I'll probably back to them after release v1.
I moved TODO to wiki pages, because here, it is doing a mess in commits, and I rather would simple list than an issues pages.
In global.asax you must do three things:
Register routes
// prefix is optional, by default = IlaroAdmin
AdminInitialise.RegisterRoutes(RouteTable.Routes, prefix: "Admin");
AdminInitialise.RegisterResourceRoutes(RouteTable.Routes);
It should be put before register default routes because you lose a friendly urls
Add entities
Entity<Customer>.Add();
Entity<Product>.Add();
Add method create a Entity object with all info from attributes. In future I want add fluent configuration of entity so, there will be no need to configure entity with attributes.
Specify access to Ilaro.Admin
Admin.Authorize = new AuthorizeAttribute(){ Roles = "Admin" };
If you don't do that everyone with proper link will have access to Ilaro.Admin.
Initialise Ilaro.Admin
Admin.Initialise("NorthwindEntities");
This line initialise UnityContainer, and bind foreign entity and tries set primary key for each entity who has not defeined it. If you have only one ConnectionString there is no need to specify it.
Register areas
AreaRegistration.RegisterAllAreas();
This step should be added by default during creating asp mvc project. Ilaro.Admin is created as area, so it needs registration.
And after that when you go to ~/IlaroAdmin url (if you don't define other prefix) you should see something like that:
Here I will try write all libraries, and part of code I use in project.