Code Monkey home page Code Monkey logo

akasarto / aspnet-mvc5-starter-template Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 20.0 16.47 MB

Asp.Net MVC 5 Starter Kit is a S.O.L.I.D, clean and globalized template with all the necessary boilerplate, ready to go.

License: MIT License

C# 72.92% JavaScript 6.07% CSS 0.55% PowerShell 2.84% Batchfile 0.33% HTML 17.26% ASP.NET 0.03%
asp-net-mvc boilerplate bootstrap4 dapper dependency-injection mvc-pattern mvc5 solid solid-principles starter-kit starter-project

aspnet-mvc5-starter-template's People

Contributors

akasarto avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnet-mvc5-starter-template's Issues

Role groups

Hi it would be nice to also add suport for RoleGroups.
If Nike and Puma were separate groups/companies, we need to separate the managers/roles

ManagersNIke for e.g. all roles (ManagNIke, BossNike, AdminNike)
ManagersPuma

How to manage roles

Hello, this is a great great template. Very clean!!

  1. Can you please add some manage roles, users in role, RolesView: list of roles with users in role. It would be a great help to learn from.
  2. Also, I saw you .tpls in the read me, what happens if I need another model besides your base model, should I just add two models to the View
  3. Can you please add a couple more notes around the Area, Controllers and View and how you are managing that.
  4. Which objects should we use to interact with user and role, I see more than a few.
  5. How can we attach custom claims/properties to the user without overloading the user object too much. I have a long list of properties i need to show for each user, but dont want to weigh down user.
  6. Nuget vs Libman, this is very interesting certainly learning a lot.

thanks

app cmd - error

hi, seems like an error when I run the app cmd. I also tried in admin mode, same error.

image

User, roles, and users in roles views

Hi, can you please add these views. I am sharing the main code with pull requests.

I would also like to help do groups, another ticket :)

public class Users_in_Role_ViewModel  
    {  
        public string UserId { get; set; }  
        public string Username { get; set; }  
        public string Email { get; set; }  
        public string Role { get; set; }  
    }  

public ActionResult UsersWithRoles()  
        {  
            var usersWithRoles = (from user in context.Users  
                                  select new  
                                  {  
                                      UserId = user.Id,                                        
                                      Username = user.UserName,  
                                      Email = user.Email,  
                                      RoleNames = (from userRole in user.Roles  
                                                   join role in context.Roles on userRole.RoleId   
                                                   equals role.Id  
                                                   select role.Name).ToList()  
                                  }).ToList().Select(p => new Users_in_Role_ViewModel()  
   
                                  {  
                                      UserId = p.UserId,  
                                      Username = p.Username,  
                                      Email = p.Email,  
                                      Role = string.Join(",", p.RoleNames)  
                                  });  
   
   
            return View(usersWithRoles);  
        }  

String error

I was able to successfully update all nugets and build, but an error with this string...

Severity Code Description Project File Line Suppression State
Error CS0103 The name 'ErrorMessageSource' does not exist in the current context App.UI.Mvc5

F:\platform-solutions\App.UI.Mvc5\Infrastructure\Validation\RequiredCheckboxValidator.cs 28 Active

public IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
		{
			var messageFormatter = new MessageFormatter().AppendPropertyName(metadata.DisplayName);
			var FormatterdMessage = messageFormatter.BuildMessage(ErrorMessageSource.GetString(null));

			var rule = new ModelClientValidationRule
			{
				ErrorMessage = FormatterdMessage,
				ValidationType = "requiredcheckbox"
			};

			yield return rule;
		}

Nuget Updates Bootstrap 4.1 & rebuild with latest .net 4.7.2 target

Hi, I noticed a huge performance boost when I installed 4.71 for this project. In the next checkin a simple update to 4.72 .NET should be fairly fast, just right click on project->properties and after you install the below updates, you can change to 4.72 easily.

Also Bootstrap & razor Views have been updated

But now, they released runtime 4.72 & updated BCL 4.72 here

  • Updating this and the SDK as project properties.
  • Nuget updates

Smooth, but a having issue at simple injector?

Hi, this is very very nice ๐Ÿ˜
reading your help, I was able to run app.cmd install from power shell, but when I run the app.

    • Couple of things I get this error SimpleInjector.SimpleInjectorMvcExtensions.RegisterMvcIntegratedFilterProvider..

System.IO.FileLoadException
  HResult=0x80131040
  Message=Could not load file or assembly 'System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  Source=SimpleInjector.Integration.Web.Mvc
  StackTrace:
   at SimpleInjector.SimpleInjectorMvcExtensions.RegisterMvcIntegratedFilterProvider(Container container)
   at App.UI.Mvc5.Initializer.GetContainer() in C:\aspnet-mvc5-sarto\sources\App.UI.Mvc5\Initializer.cs:line 72
   at App.UI.Mvc5.Initializer.ConfigureDependencyInjectionContainer(IAppBuilder appBuilder) in C:\aspnet-mvc5-sarto\sources\App.UI.Mvc5\Initializer.cs:line 89
   at App.UI.Mvc5.Initializer.Initialize(IAppBuilder appBuilder) in C:\aspnet-mvc5-sarto\sources\App.UI.Mvc5\Initializer.cs:line 56

Inner Exception 1:
FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    • also its complaining about a ref to Linq, should I ignore that or how do I fix that.
      image

Adding menu item - not defined. Route table error

Hello, can you please tell me how to ensure the route table get the area routes.

I added the below routes and even added the TopMenuItem.Cs in the Management area, it still did not find the route. I get an error - RouteTable error.

<ul class="nav navbar-nav mr-auto">
	<li class="nav-item @Menu.IfActiveItem("root.landing", "active", string.Empty)">
		<a class="nav-link" href="@Url.GetHomeUrl()">@GetLocalizedString("Home")</a>
	</li>
	@Html.Action("TopMenuItem", "_Menu", new { area = AppAreas.GetAreaName(Area.Features) })
	@Html.Action("TopMenuItem", "_Menu", new { area = AppAreas.GetAreaName(Area.Blank) })
	   
	@*@Html.Action("TopMenuItem", "_Menu", new { area = AppAreas.GetAreaName(Area.Users) })*@
	@*@Html.Action("TopMenuItem", "_Menu", new { area = AppAreas.GetAreaName(Area.Management) })*@
</ul>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.