Generic admin panel for ASP.NET MVC.
C# Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
samples/Ilaro.Admin.Sample
src
tests
tools
.gitattributes
.gitignore
Ilaro.Admin.sln
LICENSE
README.md
appveyor.yml
build.cake version @ 0.6.0 May 21, 2016
build.cmd
build.ps1 Added build script Apr 17, 2016

README.md

Ilaro.Admin Build status

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.

##TODO 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.

##Requirements:

  • POCO classes (or pseudo POCO)
  • ASP MVC 4

##Initialisation:

In global.asax you must do three things:

  1. 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

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. Go to wiki pages for more info. Entity configuration Property configuration

And after that when you go to ~/IlaroAdmin url (if you don't define other prefix) you should see something like that: ####Dashboard Ilaro.Admin dashboard ####Records list Ilaro.Admin records list ####Create new record Ilaro.Admin create new record

##What I use Here I will try write all libraries, and part of code I use in project.