Live Demo available now

I have (finally) launched the site with a functional live demo. The demo right now is very simple, and I will add a more complicated example later. But for now, you can see the code you have to write and the result that you get.


New nuget package uploaded

Some cool upgrades, I have uploaded updates to the nuget package for both EntityUi and EntityUi.Web, with the following changes:

  • For EntityUi, you no longer have to define the mapping for Automapper. If one doesn’t exist, the code automatically creates a default one. You can always create your own mapping, that that will be used.
  • Also in EntityUi, now you have Ajax methods for Edit, Update and Delete added to the controller. So basically you can now use Edit/Update/Delete on the same page using Ajax instead of redirecting to different actions… otherwise known as SPA.
  • EntityUi.Web now has a new view for the Ajax Controller. It loads Create and Edit in a Bootstrap Modal.
  • I also updated the Bootstrap package to the latest one, finally.

I am now working on a functional demo page for EntityUi. Hopefully will have it soon also.

Update on EntityUi

The nuget package crossed 500 downloads, so that’s probably good.

Just an update on what’s hopefully coming soon. I am working on making EntityUi crud work with Ajax, instead of full form posts like right now. Were just moving more and more in to just Ajax requests, and form posts are causing me grief. This will be an addition, so I won’t remove what is already there.

I’m also going to replace AutoMapper. I think it’s a little heavy. I have a default mapper that is easy to use, so it will remove the need to write view model to data model mapper.

Instructions on how to use EntityUi

Here are the basic, general steps on how to use EntityUi for a new project:

1. Start a blank MVC project, and then add 2 Class Library Projects to the Solution, one for Domain Model, and the other for Repository.

2. Then add EntityUi from nuget to the Domain Project and Repository Project in the solution using the command “Install-Package EntityUi”.

3. Next add EntityUi.Web from nuget to the blank MVC Project, using the command “Install-Package EntityUi.Web”.

4. Add your Domain Model inheriting from DomainModelBase, your Data Context class and Repository Classes inheriting from RepositoryBase, and View Model classes inheriting from ViewModelBase.

5. Add your Controller, delete the default index method and just inherit it from “ControllerBase”.

6. Finally, write the mapping setup between the Domain and View Model objects in global.aspx.

You should be able to run your application after these steps. For complete details, see this Code Project article.

EntityUi added to Nuget

I have posted EntityUi as a library on Nuget.

To install EntityUi, run the following command in the Package Manager Console

PM> Install-Package EntityUi

Here is a link to the Nuget Package:

The EntityUi package has the following core concepts:

  • DomainModelBase – Base class that your Domain Model objects need to inherit from.
  • ViewModelBase – Base class that your View Model objects need to inherit from.
  • ControllerBase – Base class for your Controller, it provides Crud methods built in.
  • RepositoryBase – Base class for your Repository, it provides Crud methods built in using Entity Framework.

I also wrote and uploaded a detailed article on how to use EntityUi on CodeProject. Here is the link:

There are a few files that are required in the MVC project for all of this to work properly. These files really are a core part of EntityUi. I will add this as a nuget package eventually, but for now, it’s available in the zipped file download in this article.

EntityUI close

Ok, so it’s been a while again. Anyway, the elusive self generated UI is very close. The framework code is mostly functional. MVC obviously provides a lot of functionality that maps your View Models back to Domain models, and knockout is an excellent MVVM framework provider. So EntityUI utilizes both to achieve it’s goals of self generated UI. I’m working on some documentation, and hopefully will have the code on nuget soon.

ASP .Net Entity UI designer using Code-First approach