https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Demo usage | |
public class HomeController : MyControllerBase | |
{ | |
private readonly IRepository<MyEntity> _myEntityRepository; | |
public HomeController(IRepository<MyEntity> myEntityRepository) | |
{ | |
_myEntityRepository = myEntityRepository; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Web.Mvc; | |
namespace BusinessMQ.Core | |
{ | |
/// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Abp.Runtime.Session; | |
namespace Abp.Temp | |
{ | |
public static class AbpSessionExtensions | |
{ | |
public static IDisposable Override(this IAbpSession abpSession, int? tenantId, long? userId) | |
{ | |
var overridableSession = abpSession as OverridableSession; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerMySqlMigrationSqlGenerator : MySqlMigrationSqlGenerator | |
{ | |
public override IEnumerable<MigrationStatement> Generate(IEnumerable<MigrationOperation> migrationOperations, string providerManifestToken) | |
{ | |
var otherMigrationOperations = new List<MigrationOperation>(); | |
var statements = new List<MigrationStatement>(); | |
foreach (var op in migrationOperations) | |
{ | |
var migration = op as AlterTableOperation; | |
if (migration != null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace System.Windows.Forms | |
{ | |
public static class ControlExtension | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Data.Common; | |
using System.Data.Entity; | |
using Abp.Zero.EntityFramework; | |
using Microsoft.Extensions.Configuration; | |
using AlanFlaherty.AdminPanelCore.Authorization.Roles; | |
using AlanFlaherty.AdminPanelCore.Configuration; | |
using AlanFlaherty.AdminPanelCore.MultiTenancy; | |
using AlanFlaherty.AdminPanelCore.Users; | |
using AlanFlaherty.AdminPanelCore.Web; | |
using MySql.Data.MySqlClient; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MyApp.Hmac | |
{ | |
public static class AuthenticationConstants | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Bootstrap | |
{ | |
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Windows.Forms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class RandomIdGenerator | |
{ | |
private static char[] _base62chars = | |
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" | |
.ToCharArray(); | |
private static Random _random = new Random(); | |
public static string GetBase62(int length) | |
{ |