Posts

Dot Net Core Middleware (Authorization + Custom Authorize)

1. AuthorizeHelper Class: 1.  Add one helper class named AuthorizeHelper which contains GroupRoles static Dictionary, GroupRoles stored GroupId as key, and List of Roles against GroupId as   Values. a.  GroupRoles Dictionary contains RoleId, RoleName, GroupName, GroupId, and Dictionary will static means it will need to store Group Id with Roles Once for all User and if one   User will store that GroupId and Roles then other access that GroupId and Roles with DB   call.   private static Dictionary<Int64, List<UsersGroup>> GroupRoles;   public class UsersGroup { public Int64 RoleId { get; set; } public Int64 GroupId { get; set; } public string GroupName { get; set; } public string RoleName { get; set; } }   2.  Add SetRoles Static Method which is First Filter Group Ids which already have in Dictionary   and then   call   DB   for   getting   Roles   from   list   of   Group   Id...

GIT Basic Command & Git Command Flow chart

Image
Git config: This command sets the author name and email address respectively to be used with your commits. $ git config –global user.name “[name]” $ git config –global user.email “[email address]” Example: $ git config –global user.name KrishnaPatel $ git config –global user.email  patelkisu707@gmail.com   Git init: This command is used to start a new repository. $ git init [repository name] Example: $ git init Git_Learning   Git clone: This command is used to obtain a repository from an existing URL. $ git clone [url] Example: $ git clone  http://github.com/PatelKrishna123/Git_Learning   Git add: This command adds a file to the staging area. $ git add [file] Example: $ git add index.html This command adds one or more to the staging area. $ git add –AGit Commands Krishna Patel   Git commit: This command records or snapshots the file permanently in the version history. $ git commit –a –m “[Type in the commit message]” Example: $ git commit –a –m “Initial com...