Skip to content

Instantly share code, notes, and snippets.

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)
@rqx110
rqx110 / AbpSessionExtensions.cs
Created November 24, 2016 05:11 — forked from hikalkan/AbpSessionExtensions.cs
Creating an overridable session for ABP
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;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web.Mvc;
namespace BusinessMQ.Core
{
/// <summary>
@rqx110
rqx110 / HomeController.cs
Last active March 9, 2018 03:46 — forked from hikalkan/HomeController.cs
扩展IRepository,支持批量插入
//Demo usage
public class HomeController : MyControllerBase
{
private readonly IRepository<MyEntity> _myEntityRepository;
public HomeController(IRepository<MyEntity> myEntityRepository)
{
_myEntityRepository = myEntityRepository;
}
@rqx110
rqx110 / ModifyInMemory.cs
Created September 19, 2016 05:20
aspose for .net total 破解
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml;
namespace LicenseHelper
@rqx110
rqx110 / browser-not-supported.js
Last active July 8, 2020 10:14
js提示浏览器不支持
window._browserIsNotSupported = true;
if (window.attachEvent) {
window.attachEvent('onload', function() {
var lowestSupportedIEVersion = 8;
var userAgent = navigator.userAgent.toLowerCase(),
s, o = {};
var browser = {
version: (userAgent.match(/(?:firefox|opera|safari|chrome|msie)[\/: ]([\d.]+)/))[1],
safari: /version.+safari/.test(userAgent),
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace AbpWebSite.Templates
{
/// <summary>
/// Used to rename a solution
/// </summary>
@rqx110
rqx110 / batchupdatenuget
Last active June 26, 2017 03:34
vs中批量更新nuget包
Get-Package | Where Id -like "Contoso.*" | Sort-Object -Property Id -Unique | foreach { Update-Package $_.Id }
OR
ForEach($project in get-project -all) { ForEach($package in Get-Package -ProjectName $project.ProjectName | ?{ $_.Id -like 'Abp*'}) { Update-Package -ProjectName $project.ProjectName -Id $package.Id;} }
/// <summary>
/// Gets the console secure password.
/// </summary>
/// <returns></returns>
private static SecureString GetConsoleSecurePassword( )
{
SecureString pwd = new SecureString( );
while ( true )
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.Runtime.InteropServices;
namespace SimpleConsole
{