Base solution for your next web application

Activities of "soonjoo"

Hello, I'm starting to implement this and trying to figure out the way to do this. How would I implement a feature checker and setting checker together, since essentially they will be the restriction for the same items?

The default tenant is where all the individual users (not tied to a company) will reside in. Am I right to say that in the default tenant, all features will be set to allowed, all maximum count will all be unlimited. However, each individual user will have their own settings depending on their pricing tiers. The settings will be on the user scope.

For other tenants, all users within those tenants won't have any individual user settings, their only restrictions are the values in the tenant features.

Should I implement both features and editions, and settings, to cater for my scenario? However this means double checking for every restriction I have. I would have to check for the features values, then individual setting values, before allowing user access. It will be messy on the front end too as I need to check both values too.

Or should I just forgo the features and editions module and build this entirely on settings, since settings is much more powerful? Seems a waste because the editions and features deal with what I plan to do and it ties to payment module, just that it is not powerful enough to tie to individual users.

Or lastly, should I extend features and editions to individual users? How much work do I need to do if I want to extend features and editions to individual users?

Thanks

The issue is still there, but for now, I will use a quick fix, this is my code that works temporarily now:

var fileWithAdditionalInfo = await _fileRepository
                .GetAll()
                .Include(e => e.FileAnnotations)
                    .ThenInclude(fileAnnotation => fileAnnotation.Annotation)
                .Where(e => e.Id == file.Id)
                .FirstOrDefaultAsync();

            var filePermissions = await _filePermissionRepository
                .GetAll()
                .Where(e => e.FileId == fileId)
                .ToListAsync();

            fileWithAdditionalInfo.FilePermissions = filePermissions;

Hello, i have issue where the deleted entities are still being queried out. This is my code:

var fileWithAdditionalInfo = await _fileRepository
                .GetAll()
                .Include(e => e.FilePermissions)
                    .ThenInclude(filePermission => filePermission.SharedWithUser)
                .Include(e => e.FileAnnotations)
                    .ThenInclude(fileAnnotation => fileAnnotation.Annotation)
                .Where(e => e.Id  == file.Id)
                .FirstOrDefaultAsync();

And this is my local variable while im debugging.

online uploader

Currently my FilePermission inherits my own class which is PermissionBase, and PermissionBase inherits FullAuditedEntity.

Am I missing something or is this a bug on your side? thank you

Same situation here, for the tests where income statistics are failing, i noticed its cos of the different cultures. Different cultures have different first day of the week, so i changed my test a bit to cater for that.

[Fact]
        public async Task Should_Get_Income_Statistics_Weekly_NotFirstDayOfWeek()
        {
            //Arrange
            UsingDbContext(
                context =>
                {
                    var standardEdition = context.SubscribableEditions.First();
                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 100,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 5, 4)
                    });

                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 200,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 5, 11)
                    });

                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 300,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 5, 18)
                    });

                });

            //Act
            var output = await _hostDashboardService.GetIncomeStatistics(new GetIncomeStatisticsDataInput
            {
                StartDate = new DateTime(2017, 5, 3),
                EndDate = new DateTime(2017, 5, 20),
                IncomeStatisticsDateInterval = ChartDateInterval.Weekly
            });

            output.IncomeStatistics.Count.ShouldBe(3);
            output.IncomeStatistics[0].Amount.ShouldBe(100);
            output.IncomeStatistics[0].Date.ShouldBe(new DateTime(2017, 5, 3));
            output.IncomeStatistics[1].Amount.ShouldBe(200);
            output.IncomeStatistics[1].Date.ShouldBeInRange(new DateTime(2017, 5, 7), new DateTime(2017, 5, 8));
            output.IncomeStatistics[2].Amount.ShouldBe(300);
            output.IncomeStatistics[2].Date.ShouldBeInRange(new DateTime(2017, 5, 14), new DateTime(2017, 5, 15));
        }
[Fact]
        public async Task Should_Get_Income_Statistics_Weekly_FirstDayOfWeek()
        {
            //Arrange
            UsingDbContext(
                context =>
                {
                    var standardEdition = context.SubscribableEditions.First();
                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 100,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 4, 30)
                    });

                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 200,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 5, 10)
                    });

                    context.SubscriptionPayments.Add(new SubscriptionPayment
                    {
                        Amount = 300,
                        Status = SubscriptionPaymentStatus.Completed,
                        EditionId = standardEdition.Id,
                        CreationTime = new DateTime(2017, 5, 20)
                    });

                });

            //Act
            var output = await _hostDashboardService.GetIncomeStatistics(new GetIncomeStatisticsDataInput
            {
                StartDate = new DateTime(2017, 4, 30),
                EndDate = new DateTime(2017, 5, 20),
                IncomeStatisticsDateInterval = ChartDateInterval.Weekly
            });

            output.IncomeStatistics.Count.ShouldBe(3);
            output.IncomeStatistics[0].Amount.ShouldBe(100);
            output.IncomeStatistics[0].Date.ShouldBeInRange(new DateTime(2017, 4, 30), new DateTime(2017, 5, 1));
            output.IncomeStatistics[1].Amount.ShouldBe(200);
            output.IncomeStatistics[1].Date.ShouldBeInRange(new DateTime(2017, 5, 7), new DateTime(2017, 5, 8));
            output.IncomeStatistics[2].Amount.ShouldBe(300);
            output.IncomeStatistics[2].Date.ShouldBeInRange(new DateTime(2017, 5, 14), new DateTime(2017, 5, 15));
        }

this is just a quick fix, not tested in other cultures tho, and I don't think it will work there. best way is to take current culture into consideration while arranging the tests data

The language test failing happened to me on my first time running too, but after awhile it went away, weird

hello, i am following the instructions of the startup guide. this is using a new project which i downloaded from your website its easy to reproduce also. i change the connection string to use a new database, run the update-database command. then i start the project locally. i immediately check the db and have duplicate value in AbpUserAccounts table

thanks

Hello, I changed all my foreign keys to delete restrict instead of delete cascade because delete cascade was giving issues during migrations of my new entities. (I have some parent child recursive referencing and they wont allow me to delete cascade)

However, now running the tests failed for Update_User_Basic_Tests and Should_Remove_From_Role.

Message: System.InvalidOperationException : The association between entity types 'User' and 'UserRole' has been severed but the foreign key for this relationship cannot be set to null. If the dependent entity should be deleted, then setup the relationship to use cascade deletes.

I was thinking of changing the table to fully audited so it doesn't actually delete the record and prevent throwing this error? Or have any other way to solve this issue? Thanks

I just downloaded the asp.net zero template, and did a migration. Everything done successfully without any issues. However, I notice there are duplicated values inside the AbpUserAccounts table. This is a fresh migration.

Is this a bug or am I missing something, or its meant to be like this? Thanks.

Thank you for your reply, I am building a software with a tenancy concept similar to event cloud, where many users are together within the default tenant that can create and share events with each other. So I don't think the first option to have each user become a tenant is viable. For the second option, how would you suggest developing myself? I was thinking of adding another column into the edition table, to tie it to a user. Another way would be to utilize the setting table, to have each feature become a setting. What do you think? Thanks

Hello, my software will cater for individual users, as well as enterprise users. For enterprise users, they will become their own tenant and have their own users, so the editions and features are great. However, for individual users, all of them will be within the same tenant (default tenant), and they can sign up as free or paid with different pricing tiers and allowing them to different features and limitations. How would I go about allowing the individual users within the same tenant to have different editions?

Thank you.

Showing 51 to 59 of 59 entries