Skip to content

Instantly share code, notes, and snippets.

View hikalkan's full-sized avatar

Halil İbrahim Kalkan hikalkan

View GitHub Profile
@hikalkan
hikalkan / GetScenariosInput.cs
Last active August 29, 2015 14:26
jTable ABP adapter
public class GetScenariosInput : IPagedResultRequest, ISortedResultRequest, IShouldNormalize
{
public int MaxResultCount { get; set; }
public int SkipCount { get; set; }
public string Sorting { get; set; }
public bool? IsActive { get; set; }
public GetScenariosInput()
{
public partial class Create_Indexes_For_Module_Zero_Tables : DbMigration
{
public override void Up()
{
DropIndex("AbpPermissions", new[] { "UserId" });
DropIndex("AbpPermissions", new[] { "RoleId" });
DropIndex("AbpRoles", new[] { "TenantId" });
DropIndex("AbpSettings", new[] { "TenantId" });
DropIndex("AbpSettings", new[] { "UserId" });
DropIndex("AbpUserLogins", new[] { "UserId" });
@hikalkan
hikalkan / Unit test exception message
Last active August 29, 2015 14:17
Effort.Ef6 & EntityFramework.DynamicFilters combine problem
System.NullReferenceExceptionObject reference not set to an instance of an object.
at Effort.Internal.CommandActions.DbCommandActionHelper.FormatParameters(IList`1 source, IList`1 description, ITypeConverter converter)
at Effort.Internal.CommandActions.QueryCommandAction.ExecuteDataReader(ActionContext context)
at Effort.Provider.EffortEntityCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Internal.InterceptableDbCommand.Execu
@hikalkan
hikalkan / MyModule.cs
Last active July 2, 2021 05:54
Simple console application with ABP and EF.
[DependsOn(typeof(AbpEntityFrameworkModule))]
public class MyModule : AbpModule
{
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
}
@hikalkan
hikalkan / gist:1e5d0f0142484da994e0
Created October 15, 2014 05:42
Castle Windsor interceptor for async methods
class Program
{
static void Main(string[] args)
{
using (var container = new WindsorContainer())
{
container.Register(
Component.For<MyInterceptor>().LifestyleTransient(),
Component.For<MyTester>().Interceptors<MyInterceptor>().LifestyleTransient()
);
@hikalkan
hikalkan / gist:58b2eb983e7b7dae0d1b
Created September 21, 2014 18:38
Working Kendo with ABP sample codes
//Create a base class for common parameters
public class KendoInputDto : IInputDto
{
public int Take { get; set; }
public int Skip { get; set; }
public IEnumerable<Sort> Sort { get; set; }
public Filter Filter { get; set; }
}