private UserSecurityRole Translate(AuthUserSecurityRole dbRecord)
 {
     return(new UserSecurityRole
     {
         UserId = dbRecord.UserId,
         SecurityRole = (SecurityRole)dbRecord.SecurityRoleId,
         DateCreated = dbRecord.DateCreated,
         CreatedBy = dbRecord.CreatedBy
     });
 }
        public async override Task <UserSecurityRole> Create(UserSecurityRole entity)
        {
            var dbRecord = new AuthUserSecurityRole
            {
                UserId         = entity.UserId,
                SecurityRoleId = (int)entity.SecurityRole,
                DateCreated    = DateTime.UtcNow,
                CreatedBy      = entity.CreatedBy
            };

            Uow.DbContext.UserSecurityRole.Add(dbRecord);

            await Uow.SaveChanges();

            return(Translate(dbRecord));
        }