private static void CreateCurrencyEqualCommissions(this ModelBuilder builder, CommissionRecord commissionPattern, CurrencyRecord currency, int mul) { commissionPattern.CurrencyId = currency.Id; builder.Entity <CommissionRecord>().HasData( commissionPattern.CreateSameCommission(OperationType.Deposit, mul * commissionPattern.Id + 1), commissionPattern.CreateSameCommission(OperationType.Withdrawal, mul * commissionPattern.Id + 2), commissionPattern.CreateSameCommission(OperationType.Transfer, mul * commissionPattern.Id + 3)); }
private static void CreateUserCommission(this ModelBuilder builder, UserRecord user, CommissionRecord commissionPattern, CurrencyRecord currency, OperationType type, int mul) { var commission = commissionPattern.CreateSameCommission(type, mul * commissionPattern.Id + 1); commission.CurrencyId = currency.Id; commission.UserId = user.Id; builder.Entity <CommissionRecord>().HasData(commission); }