module-zero-core-template | NET Core MVC / Angular Startup Project | Model View Controller library

 by   aspnetboilerplate C# Version: v8.0.0 License: MIT

kandi X-RAY | module-zero-core-template Summary

module-zero-core-template is a C# library typically used in Architecture, Model View Controller, Angular applications. module-zero-core-template has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.
This is a template to create ASP.NET Core MVC / Angular based startup projects for ASP.NET Boilerplate. It has 2 different versions:. User Interface is based on AdminLTE theme.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        module-zero-core-template has a medium active ecosystem.
                        summary
                        It has 807 star(s) with 518 fork(s). There are 83 watchers for this library.
                        summary
                        There were 1 major release(s) in the last 6 months.
                        summary
                        module-zero-core-template has no issues reported. There are 4 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of module-zero-core-template is v8.0.0
                        This Library - Support
                          Best in #Model View Controller
                            Average in #Model View Controller
                            This Library - Support
                              Best in #Model View Controller
                                Average in #Model View Controller

                                  kandi-Quality Quality

                                    summary
                                    module-zero-core-template has 0 bugs and 0 code smells.
                                    This Library - Quality
                                      Best in #Model View Controller
                                        Average in #Model View Controller
                                        This Library - Quality
                                          Best in #Model View Controller
                                            Average in #Model View Controller

                                              kandi-Security Security

                                                summary
                                                module-zero-core-template has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                module-zero-core-template code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                This Library - Security
                                                  Best in #Model View Controller
                                                    Average in #Model View Controller
                                                    This Library - Security
                                                      Best in #Model View Controller
                                                        Average in #Model View Controller

                                                          kandi-License License

                                                            summary
                                                            module-zero-core-template is licensed under the MIT License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            This Library - License
                                                              Best in #Model View Controller
                                                                Average in #Model View Controller
                                                                This Library - License
                                                                  Best in #Model View Controller
                                                                    Average in #Model View Controller

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        module-zero-core-template releases are available to install and integrate.
                                                                        summary
                                                                        Installation instructions are available. Examples and code snippets are not available.
                                                                        summary
                                                                        module-zero-core-template saves you 3618 person hours of effort in developing the same functionality from scratch.
                                                                        summary
                                                                        It has 7921 lines of code, 0 functions and 613 files.
                                                                        summary
                                                                        It has low code complexity. Code complexity directly impacts maintainability of the code.
                                                                        This Library - Reuse
                                                                          Best in #Model View Controller
                                                                            Average in #Model View Controller
                                                                            This Library - Reuse
                                                                              Best in #Model View Controller
                                                                                Average in #Model View Controller
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  module-zero-core-template Key Features

                                                                                  ASP.NET Core MVC & jQuery (server rendered multi-page application).
                                                                                  ASP.NET Core & Angular (single page application).

                                                                                  module-zero-core-template Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for module-zero-core-template.
                                                                                  Community Discussions

                                                                                  Trending Discussions on module-zero-core-template

                                                                                  Why repository "Get" and "GetAsync" methods throw EntityNotFoundException instead of returning null if the entity doesn't exists?
                                                                                  chevron right
                                                                                  .Net Core template has a compile warning CS0108 for property SettingManager
                                                                                  chevron right
                                                                                  How to use SettingDefinitionGroup?
                                                                                  chevron right
                                                                                  ABP 401 response from API instead of redirect
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  Why repository "Get" and "GetAsync" methods throw EntityNotFoundException instead of returning null if the entity doesn't exists?
                                                                                  Asked 2019-May-09 at 12:46

                                                                                  Using the module-zero-core-template (fully updated), I recently had problems when a user asked for account deletion (it was the first time), a lot of places in my code were getting the "User" entity using Repository.Get(TPrimaryKey id) or Repository.GetAsync(TPrimaryKey id):

                                                                                  var user = _userRepository.Get(model.UserId);
                                                                                  

                                                                                  Until now I didn't realize it was throwing an exception when the entity doesn't exists, but I had to replace all the calls by (or the equivalent async):

                                                                                  var user = _userRepository.FirstOrDefault(u => u.Id == model.UserId);
                                                                                  

                                                                                  My code wasn't made to handle such exception, but only a null value in return.

                                                                                  My questions are:

                                                                                  • Why an exception instead of a null value returned?
                                                                                  • Is there a way to modify this behavior?

                                                                                  Thanx in advance.

                                                                                  ANSWER

                                                                                  Answered 2019-May-09 at 12:46

                                                                                  This is because the implementation is doing it like that.

                                                                                  If you want to find an entity without the exception being thrown, you have to use the FirstOrDefault(TPrimaryKey id) function.

                                                                                  Edit(explanation):

                                                                                  Is like saying Single(x => x.Id == 1). You are expecting a result, if it doesn't have that, it will throw an exception. That's why we have SingleOrDefault(expr) and SingleOrDefault(expr) or FirstOrDefault(expr) and First(expr). Same principal involved

                                                                                  Source https://stackoverflow.com/questions/56058796

                                                                                  QUESTION

                                                                                  .Net Core template has a compile warning CS0108 for property SettingManager
                                                                                  Asked 2019-May-01 at 07:14

                                                                                  I am trying to remove all build warnings in the .net core template. I have reduced it to one:

                                                                                  • Code: CS0108
                                                                                  • Description: 'Views_Shared__Layout.SettingManager' hides inherited member 'AbpRazorPage.SettingManager'. Use the new keyword if hiding was intended.
                                                                                  • Project: AbpCompanyName.AbpProjectName.Web.Mvc
                                                                                  • File: module-zero-core-template\aspnet-core\src\AbpCompanyName.AbpProjectName.Web.Mvc\obj\Debug\netcoreapp2.2\Razor\Views\Shared_Layout.g.cshtml.cs
                                                                                  • Line: 1869

                                                                                  I am trying to find a way to eliminate or suppress this warning in the smallest possible scope.

                                                                                  ANSWER

                                                                                  Answered 2019-May-01 at 07:14

                                                                                  you can remove the setting manager in the layout.cshtml directly.

                                                                                  Remove unnecessary setting manager injection since it has been injected in AbpRazorPage

                                                                                  See the changes in https://github.com/aspnetboilerplate/module-zero-core-template/pull/450

                                                                                  Source https://stackoverflow.com/questions/55899727

                                                                                  QUESTION

                                                                                  How to use SettingDefinitionGroup?
                                                                                  Asked 2018-Aug-19 at 16:54

                                                                                  I use the free multi-page template for ASP.NET Core v4.0.0, which is based on the ASP.NET Boilerplate v3.8.1. The template already implements AppSettingProvider, in which you can add the necessary settings for the application or user scope like so on. The problem is that I need to use a very large number of settings, which makes sense to group. To do this, the SettingDefinition class has the SettingDefinitionGroup group property. But how to use it? The official documentation says that this serves just for use in the UI, but does not give an example of its use.

                                                                                  For example, there is such a structure of settings:

                                                                                  namespace ProjectName.Configuration {
                                                                                  
                                                                                      public static class AppSettingNames {
                                                                                  
                                                                                          public const string UiTheme = "App.UiTheme";
                                                                                  
                                                                                          public static class BaseData {
                                                                                              public static class Company {
                                                                                                  public const string Name = "BaseData.Company.Name";
                                                                                                  // ...
                                                                                                  public static class PostAddress {
                                                                                                      public const string Country = "BaseData.Company.PostAddress.Country";
                                                                                                      // ...
                                                                                                  }
                                                                                              }
                                                                                              public static class UI {
                                                                                                  public static class Footer {
                                                                                                      public const bool IsVisible = "BaseData.UI.Footer.IsVisible";
                                                                                                      // ...
                                                                                                  }
                                                                                                  public static class Widget {
                                                                                                      public static class Weather {
                                                                                                          public const bool IsVisible = "BaseData.UI.Widget.IsVisible";
                                                                                                          // ...
                                                                                                      }
                                                                                                  }
                                                                                              }
                                                                                          }
                                                                                      }
                                                                                  }
                                                                                  

                                                                                  How, in this case, to specify it in the SettingProvider and use setting groups in UI?

                                                                                  namespace ProjectName.Configuration {
                                                                                      public class AppSettingProvider : SettingProvider {
                                                                                  
                                                                                          public override IEnumerable GetSettingDefinitions(SettingDefinitionProviderContext context) {
                                                                                              return new[]
                                                                                              {
                                                                                                  new SettingDefinition(AppSettingNames.UiTheme, 
                                                                                                      "red", 
                                                                                                      scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User, 
                                                                                                      isVisibleToClients: true
                                                                                                  ),
                                                                                  
                                                                                                  /* BaseData */
                                                                                                  new SettingDefinition(AppSettingNames.BaseData.Company.Name,
                                                                                                      "default value",
                                                                                                      displayName: "setting name",
                                                                                                      description: "setting description",
                                                                                                      scopes: SettingScopes.Application | SettingScopes.Tenant,
                                                                                                      isVisibleToClients: true,
                                                                                                      group: ?,
                                                                                                      clientVisibilityProvider: new RequiresAuthenticationSettingClientVisibilityProvider()
                                                                                                  )
                                                                                              };
                                                                                          }
                                                                                      }
                                                                                  }
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2018-Aug-19 at 16:38

                                                                                  It is not currently being used, so there is a little work to do to actually use it.

                                                                                  Configuration:

                                                                                  public class AppSettingProvider : SettingProvider
                                                                                  {
                                                                                      // Hold groups
                                                                                      public static List Groups = new List();
                                                                                  
                                                                                      public override IEnumerable GetSettingDefinitions(SettingDefinitionProviderContext context)
                                                                                      {
                                                                                          // Create groups
                                                                                          var group1 = new SettingDefinitionGroup("group1", new LocalizableString("group1_displayName", "sourceName"));
                                                                                          var group2 = new SettingDefinitionGroup("group2", new LocalizableString("group2_displayName", "sourceName"));
                                                                                  
                                                                                          // Add groups
                                                                                          Groups.Add(group1);
                                                                                          Groups.Add(group2);
                                                                                  
                                                                                          // Configure hierarchy
                                                                                          group1.AddChild(group2);
                                                                                  
                                                                                          return new[]
                                                                                          {
                                                                                              new SettingDefinition(AppSettingNames.UiTheme,
                                                                                                  "red",
                                                                                                  scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User,
                                                                                                  isVisibleToClients: true
                                                                                              ),
                                                                                  
                                                                                              // Grouped
                                                                                              new SettingDefinition("setting1_name",
                                                                                                  "setting1_defaultValue",
                                                                                                  group: group1
                                                                                              ),
                                                                                              new SettingDefinition("setting2_name",
                                                                                                  "setting2_defaultValue",
                                                                                                  group: group2
                                                                                              )
                                                                                          };
                                                                                      }
                                                                                  }
                                                                                  

                                                                                  UI model:

                                                                                  public class SettingGroup
                                                                                  {
                                                                                      public List Children { get; set; }
                                                                                  
                                                                                      public string Name { get; set; }
                                                                                  
                                                                                      public List Settings { get; set; }
                                                                                  }
                                                                                  

                                                                                  Helpers:

                                                                                  private async Task GetSettingGroup(string name)
                                                                                  {
                                                                                      var groupList = AppSettingProvider.Groups.Where(g => g.Name == name).ToList();
                                                                                      var settingDefinitions = _settingDefinitionManager.GetAllSettingDefinitions();
                                                                                      var settings = await SettingManager.GetAllSettingValuesAsync();
                                                                                  
                                                                                      return GetSettingGroupsRecursively(groupList, settingDefinitions, settings).FirstOrDefault();
                                                                                  }
                                                                                  
                                                                                  private List GetSettingGroupsRecursively(IReadOnlyList groups, IReadOnlyList settingDefinitions, IReadOnlyList settings)
                                                                                  {
                                                                                      return groups
                                                                                          .Select(group => new SettingGroup
                                                                                          {
                                                                                              Children = GetSettingGroupsRecursively(group.Children, settingDefinitions, settings),
                                                                                              Name = group.Name,
                                                                                              Settings = GetGroupSettings(group, settingDefinitions, settings)
                                                                                          })
                                                                                          .ToList();
                                                                                  }
                                                                                  
                                                                                  private List GetGroupSettings(SettingDefinitionGroup group, IReadOnlyList settingDefinitions, IReadOnlyList settings)
                                                                                  {
                                                                                      return settingDefinitions
                                                                                          .Where(sd => sd.Group?.Name == group?.Name)
                                                                                          .Select(sd => settings.Where(s => s.Name == sd.Name).FirstOrDefault())
                                                                                          .Where(s => s != null)
                                                                                          .ToList();
                                                                                  }
                                                                                  

                                                                                  Usage:

                                                                                  var group1SettingGroup = await GetSettingGroup("group1");
                                                                                  var group1Settings = group1SettingGroup.Settings;
                                                                                  
                                                                                  // Check hierarchy
                                                                                  // var group2SettingGroup = group1SettingGroup.Children.First();
                                                                                  // var group2Settings = group2SettingGroup.Settings;
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/51877559

                                                                                  QUESTION

                                                                                  ABP 401 response from API instead of redirect
                                                                                  Asked 2018-Feb-25 at 03:15

                                                                                  I have the same problem as this: https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=4865, but I have ABP v2.1 with module-zero-core-template.

                                                                                  I'm using Web.Mvc project as my startup project and I want to make API calls.

                                                                                  When I perform an unauthorized request to the API, I got a "200 OK" response instead of a "401". Where did I make a mistake?

                                                                                  ANSWER

                                                                                  Answered 2018-Jan-27 at 20:09

                                                                                  This authorization doc will give you each and every detail.

                                                                                  Source https://stackoverflow.com/questions/45144589

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install module-zero-core-template

                                                                                  Create & download your project from https://aspnetboilerplate.com/Templates.

                                                                                  Support

                                                                                  ASP.NET Core MVC & jQuery version.ASP.NET Core & Angular version.
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  CLONE
                                                                                • HTTPS

                                                                                  https://github.com/aspnetboilerplate/module-zero-core-template.git

                                                                                • CLI

                                                                                  gh repo clone aspnetboilerplate/module-zero-core-template

                                                                                • sshUrl

                                                                                  git@github.com:aspnetboilerplate/module-zero-core-template.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Consider Popular Model View Controller Libraries

                                                                                  Try Top Libraries by aspnetboilerplate

                                                                                  aspnetboilerplate

                                                                                  by aspnetboilerplateC#

                                                                                  aspnetboilerplate-samples

                                                                                  by aspnetboilerplateJavaScript

                                                                                  module-zero-forsaken

                                                                                  by aspnetboilerplateC#

                                                                                  eventcloud

                                                                                  by aspnetboilerplateC#

                                                                                  aspnet-core-template

                                                                                  by aspnetboilerplateC#

                                                                                  Compare Model View Controller Libraries with Highest Support

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit