Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "maharatha"

Answer

Thank You for considering this. You are the best

Answer

If we can create a property like "Notification" or "UserMessage" if Success is true then Application layer can set the property and send it to the controller/ view to display it. Default message could be "The Transaction is successfully saved" so that I can always use this property to notify.

Let me know your thoughts

namespace <<SOMENAME>>.<XXXX>>>.Migrations { using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure.Annotations; using System.Data.Entity.Migrations;

public partial class ForHilkan : DbMigration
{
    public override void Up()
    {
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Roles", newName: "Roles");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Users", newName: "Users");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_OrganizationUnits", newName: "OrganizationUnits");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_UserLogins", newName: "UserLogins");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Permissions", newName: "Permissions");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_UserRoles", newName: "UserRoles");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Settings", newName: "Settings");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Tenants", newName: "Tenants");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Editions", newName: "Editions");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_AuditLogs", newName: "AuditLogs");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_BackgroundJobs", newName: "BackgroundJobs");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Features", newName: "Features");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Languages", newName: "Languages");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_LanguageTexts", newName: "LanguageTexts");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_Notifications", newName: "Notifications");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_NotificationSubscriptions", newName: "NotificationSubscriptions");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_UserLoginAttempts", newName: "UserLoginAttempts");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_UserNotifications", newName: "UserNotifications");
        RenameTable(name: "dbo.&lt;&lt;SOMENAME&gt;>_UserOrganizationUnits", newName: "UserOrganizationUnits");
        MoveTable(name: "dbo.Roles", newSchema: "xxx");
        MoveTable(name: "dbo.Users", newSchema: "xxx");
        MoveTable(name: "dbo.OrganizationUnits", newSchema: "xxx");
        MoveTable(name: "dbo.UserLogins", newSchema: "xxx");
        MoveTable(name: "dbo.Permissions", newSchema: "xxx");
        MoveTable(name: "dbo.UserRoles", newSchema: "xxx");
        MoveTable(name: "dbo.Settings", newSchema: "xxx");
        MoveTable(name: "dbo.Tenants", newSchema: "xxx");
        MoveTable(name: "dbo.Editions", newSchema: "xxx");
        MoveTable(name: "dbo.AuditLogs", newSchema: "xxx");
        MoveTable(name: "dbo.BackgroundJobs", newSchema: "xxx");
        MoveTable(name: "dbo.Features", newSchema: "xxx");
        MoveTable(name: "dbo.Languages", newSchema: "xxx");
        MoveTable(name: "dbo.LanguageTexts", newSchema: "xxx");
        MoveTable(name: "dbo.Notifications", newSchema: "xxx");
        MoveTable(name: "dbo.NotificationSubscriptions", newSchema: "xxx");
        MoveTable(name: "dbo.UserLoginAttempts", newSchema: "xxx");
        MoveTable(name: "dbo.UserNotifications", newSchema: "xxx");
        MoveTable(name: "dbo.UserOrganizationUnits", newSchema: "xxx");
        CreateTable(
            "dbo.&lt;&lt;SOMENAME&gt;>_OrganizationUnits",
            c => new
                {
                    Id = c.Long(nullable: false),
                    MyId = c.Int(),
                },
            annotations: new Dictionary&lt;string, object&gt;
            {
                { "DynamicFilter_OrganizationExtended_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                { "DynamicFilter_OrganizationExtended_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("xxx.OrganizationUnits", t => t.Id)
            .Index(t => t.Id);
        
        AlterTableAnnotations(
            "xxx.OrganizationUnits",
            c => new
                {
                    Id = c.Long(nullable: false, identity: true),
                    TenantId = c.Int(),
                    ParentId = c.Long(),
                    Code = c.String(nullable: false, maxLength: 128),
                    DisplayName = c.String(nullable: false, maxLength: 128),
                    IsDeleted = c.Boolean(nullable: false),
                    DeleterUserId = c.Long(),
                    DeletionTime = c.DateTime(),
                    LastModificationTime = c.DateTime(),
                    LastModifierUserId = c.Long(),
                    CreationTime = c.DateTime(nullable: false),
                    CreatorUserId = c.Long(),
                },
            annotations: new Dictionary&lt;string, AnnotationValues&gt;
            {
                { 
                    "DynamicFilter_OrganizationExtended_MayHaveTenant",
                    new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
                },
                { 
                    "DynamicFilter_OrganizationExtended_SoftDelete",
                    new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
                },
            });
        
        DropColumn("xxx.OrganizationUnits", "MyId");
        DropColumn("xxx.OrganizationUnits", "Discriminator");
    }
    
    public override void Down()
    {
        AddColumn("xxx.OrganizationUnits", "Discriminator", c => c.String(nullable: false, maxLength: 128));
        AddColumn("xxx.OrganizationUnits", "MyId", c => c.Int());
        DropForeignKey("dbo.&lt;&lt;SOMENAME&gt;>_OrganizationUnits", "Id", "xxx.OrganizationUnits");
        DropIndex("dbo.&lt;&lt;SOMENAME&gt;>_OrganizationUnits", new[] { "Id" });
        AlterTableAnnotations(
            "xxx.OrganizationUnits",
            c => new
                {
                    Id = c.Long(nullable: false, identity: true),
                    TenantId = c.Int(),
                    ParentId = c.Long(),
                    Code = c.String(nullable: false, maxLength: 128),
                    DisplayName = c.String(nullable: false, maxLength: 128),
                    IsDeleted = c.Boolean(nullable: false),
                    DeleterUserId = c.Long(),
                    DeletionTime = c.DateTime(),
                    LastModificationTime = c.DateTime(),
                    LastModifierUserId = c.Long(),
                    CreationTime = c.DateTime(nullable: false),
                    CreatorUserId = c.Long(),
                },
            annotations: new Dictionary&lt;string, AnnotationValues&gt;
            {
                { 
                    "DynamicFilter_OrganizationExtended_MayHaveTenant",
                    new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
                },
                { 
                    "DynamicFilter_OrganizationExtended_SoftDelete",
                    new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
                },
            });
        
        DropTable("dbo.&lt;&lt;SOMENAME&gt;>_OrganizationUnits",
            removedAnnotations: new Dictionary&lt;string, object&gt;
            {
                { "DynamicFilter_OrganizationExtended_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                { "DynamicFilter_OrganizationExtended_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
            });
        MoveTable(name: "xxx.UserOrganizationUnits", newSchema: "dbo");
        MoveTable(name: "xxx.UserNotifications", newSchema: "dbo");
        MoveTable(name: "xxx.UserLoginAttempts", newSchema: "dbo");
        MoveTable(name: "xxx.NotificationSubscriptions", newSchema: "dbo");
        MoveTable(name: "xxx.Notifications", newSchema: "dbo");
        MoveTable(name: "xxx.LanguageTexts", newSchema: "dbo");
        MoveTable(name: "xxx.Languages", newSchema: "dbo");
        MoveTable(name: "xxx.Features", newSchema: "dbo");
        MoveTable(name: "xxx.BackgroundJobs", newSchema: "dbo");
        MoveTable(name: "xxx.AuditLogs", newSchema: "dbo");
        MoveTable(name: "xxx.Editions", newSchema: "dbo");
        MoveTable(name: "xxx.Tenants", newSchema: "dbo");
        MoveTable(name: "xxx.Settings", newSchema: "dbo");
        MoveTable(name: "xxx.UserRoles", newSchema: "dbo");
        MoveTable(name: "xxx.Permissions", newSchema: "dbo");
        MoveTable(name: "xxx.UserLogins", newSchema: "dbo");
        MoveTable(name: "xxx.OrganizationUnits", newSchema: "dbo");
        MoveTable(name: "xxx.Users", newSchema: "dbo");
        MoveTable(name: "xxx.Roles", newSchema: "dbo");
        RenameTable(name: "dbo.UserOrganizationUnits", newName: "&lt;&lt;SOMENAME&gt;>_UserOrganizationUnits");
        RenameTable(name: "dbo.UserNotifications", newName: "&lt;&lt;SOMENAME&gt;>_UserNotifications");
        RenameTable(name: "dbo.UserLoginAttempts", newName: "&lt;&lt;SOMENAME&gt;>_UserLoginAttempts");
        RenameTable(name: "dbo.NotificationSubscriptions", newName: "&lt;&lt;SOMENAME&gt;>_NotificationSubscriptions");
        RenameTable(name: "dbo.Notifications", newName: "&lt;&lt;SOMENAME&gt;>_Notifications");
        RenameTable(name: "dbo.LanguageTexts", newName: "&lt;&lt;SOMENAME&gt;>_LanguageTexts");
        RenameTable(name: "dbo.Languages", newName: "&lt;&lt;SOMENAME&gt;>_Languages");
        RenameTable(name: "dbo.Features", newName: "&lt;&lt;SOMENAME&gt;>_Features");
        RenameTable(name: "dbo.BackgroundJobs", newName: "&lt;&lt;SOMENAME&gt;>_BackgroundJobs");
        RenameTable(name: "dbo.AuditLogs", newName: "&lt;&lt;SOMENAME&gt;>_AuditLogs");
        RenameTable(name: "dbo.Editions", newName: "&lt;&lt;SOMENAME&gt;>_Editions");
        RenameTable(name: "dbo.Tenants", newName: "&lt;&lt;SOMENAME&gt;>_Tenants");
        RenameTable(name: "dbo.Settings", newName: "&lt;&lt;SOMENAME&gt;>_Settings");
        RenameTable(name: "dbo.UserRoles", newName: "&lt;&lt;SOMENAME&gt;>_UserRoles");
        RenameTable(name: "dbo.Permissions", newName: "&lt;&lt;SOMENAME&gt;>_Permissions");
        RenameTable(name: "dbo.UserLogins", newName: "&lt;&lt;SOMENAME&gt;>_UserLogins");
        RenameTable(name: "dbo.OrganizationUnits", newName: "&lt;&lt;SOMENAME&gt;>_OrganizationUnits");
        RenameTable(name: "dbo.Users", newName: "&lt;&lt;SOMENAME&gt;>_Users");
        RenameTable(name: "dbo.Roles", newName: "&lt;&lt;SOMENAME&gt;>_Roles");
    }
}

}

Answer

I would prefer to be a notification rather being a message box

I was trying to move the AbpTables from dbo. to xxx. using the latest changes

protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder);

        modelBuilder.ChangeAbpTablePrefix&lt;Tenant, Role, User&gt;(string.Empty,"xxx");
    }

When I run the migration I get this issue while seeding :

Running Seed method. System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "BackgroundJobs" because it does not exist or you do not have permissions.

ClientConnectionId:5c2bb018-df94-40df-8044-a3dc537b3e1a Error Number:4902,State:1,Class:16

Any Ideas ?

Answer

From App Service. yes I can create one , but I was thinking if it would be part of the framework that would be nice.

Answer

Thank You Point noted. : :)

Question

The json returned by abp has place holder for Error Message, but I am not sure how to send a Success Message. There are instances where I would like to send a customized success message.

Is there a way to handle it ?

Thanks, Partha

Question

Hi -

I am now building an application where in I have asked the UI developers not to put any validation as of now so that I want to make sure all validations are present for the middle tier and also for the web services.

So when I submit a form the validation message returned by Abp is something like this :

The UserName is required. My problem is UserName is the column name, but when I put DisplayName in the DTO for "UserName" it doesn't recognize it. I would like to show an user friendly message like The User Name is required instead of the datbase column name or DTO property name.

Can you let me know where to make the changes?

Thank you so much. But as I am not sure how to write it for ExtJS so probably have to wait for someone to help me out

Showing 281 to 290 of 326 entries