Are there any changelogs for this?
Perfect! Thanks!
I'm new git, I must admit.
What are your recommendations for keeping the private repository in sync with my local repository?
I want to make sure to integrate the latest.
Thank you.
By the way, if I want to contribute, how do I make a pull request on the private repository?
This is definitely a bug in date-picker.component.ts
I changed the ngAfterViewInit() to the following:
ngAfterViewInit(): void {
const $element = $(this.hostElement.nativeElement);
$element.datetimepicker({
locale: abp.localization.currentLanguage.name,
format: 'L'
}).on('changeDate', e => {
this.selectedDate = moment(e.date);
}).on('clearDate', e => {
this.selectedDate = null;
});
}
Now it works.
I tried the above code on one of my components, but get the following error:
$element.datepicker is not a function
at DatePickerDirective.ngAfterViewInit (date-picker.component.ts:38)
<cite>BBakerMMC: </cite> Or just add an attribute to the class for "table" that strips off the s.
Yes, I did it in combination with the extension method.
Great! Thanks!
Here's what I'm using in case anyone else is interested.
public static class ModelBuilderExtensions
{
public static void ChangeAbpTablePrefixAndPluralization<TTenant, TRole, TUser>(this ModelBuilder modelBuilder, string prefix, string schemaName = null, bool plural = true)
where TTenant : AbpTenant<TUser>
where TRole : AbpRole<TUser>
where TUser : AbpUser<TUser>
{
prefix = prefix ?? "";
var s = "";
if (plural)
{
s = "s";
}
SetTableName<AuditLog>(modelBuilder, prefix + "AuditLog" + s, schemaName);
SetTableName<BackgroundJobInfo>(modelBuilder, prefix + "BackgroundJob" + s, schemaName);
SetTableName<Edition>(modelBuilder, prefix + "Edition" + s, schemaName);
SetTableName<FeatureSetting>(modelBuilder, prefix + "Feature" + s, schemaName);
SetTableName<TenantFeatureSetting>(modelBuilder, prefix + "Feature" + s, schemaName);
SetTableName<EditionFeatureSetting>(modelBuilder, prefix + "Feature" + s, schemaName);
SetTableName<ApplicationLanguage>(modelBuilder, prefix + "Language" + s, schemaName);
SetTableName<ApplicationLanguageText>(modelBuilder, prefix + "LanguageText" + s, schemaName);
SetTableName<NotificationInfo>(modelBuilder, prefix + "Notification" + s, schemaName);
SetTableName<NotificationSubscriptionInfo>(modelBuilder, prefix + "NotificationSubscription" + s, schemaName);
SetTableName<OrganizationUnit>(modelBuilder, prefix + "OrganizationUnit" + s, schemaName);
SetTableName<PermissionSetting>(modelBuilder, prefix + "Permission" + s, schemaName);
SetTableName<RolePermissionSetting>(modelBuilder, prefix + "Permission" + s, schemaName);
SetTableName<UserPermissionSetting>(modelBuilder, prefix + "Permission" + s, schemaName);
SetTableName<TRole>(modelBuilder, prefix + "Role" + s, schemaName);
SetTableName<Setting>(modelBuilder, prefix + "Setting" + s, schemaName);
SetTableName<TTenant>(modelBuilder, prefix + "Tenant" + s, schemaName);
SetTableName<UserLogin>(modelBuilder, prefix + "UserLogin" + s, schemaName);
SetTableName<UserLoginAttempt>(modelBuilder, prefix + "UserLoginAttempt" + s, schemaName);
SetTableName<TenantNotificationInfo>(modelBuilder, prefix + "TenantNotification" + s, schemaName);
SetTableName<UserNotificationInfo>(modelBuilder, prefix + "UserNotification" + s, schemaName);
SetTableName<UserOrganizationUnit>(modelBuilder, prefix + "UserOrganizationUnit" + s, schemaName);
SetTableName<UserRole>(modelBuilder, prefix + "UserRole" + s, schemaName);
SetTableName<TUser>(modelBuilder, prefix + "User" + s, schemaName);
SetTableName<UserAccount>(modelBuilder, prefix + "UserAccount" + s, schemaName);
SetTableName<UserClaim>(modelBuilder, prefix + "UserClaim" + s, schemaName);
SetTableName<RoleClaim>(modelBuilder, prefix + "RoleClaim" + s, schemaName);
SetTableName<UserToken>(modelBuilder, prefix + "UserToken" + s, schemaName);
}
internal static void SetTableName<TEntity>(this ModelBuilder modelBuilder, string tableName, string schemaName)
where TEntity : class
{
if (schemaName == null)
{
modelBuilder.Entity<TEntity>().ToTable(tableName);
}
else
{
modelBuilder.Entity<TEntity>().ToTable(tableName, schemaName);
}
}
}
What is the recommended way to make my table names singular, and to remove the abp prefix?