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

Activities of "deltavision"

Hi @ismcagdas

just tested - if using the original code, and upload a logo file (png format) to the Tenant, then emails look OK.

The {EMAIL_LOGO_URL} - then serves a PNG file, and it shows fine in email.

Thats a work-a-round, but would be nice if the standard {EMAIL_LOGO_URL} - could serve a PNG instead of a SVG for the mails :-)

Hi @ismcagdas

yes I commented your original code (is below in screenshot) - so {EMAIL_LOGO_URL} is not in effect.

OK - Thank You.

Hi maliming and zony,

with inspiration from ismcagdas:

https://support.aspnetzero.com/QA/Questions/8843/EF-Core-3x-breaking-existing-EF-Core-2x-query#answer-cfa9c984-d70d-b7b3-3984-39f4951c1784

I have changed my code - and this actually works in my case :-) I also included search in sub-entities on Customers. A customer can have 0..N Calculations and a Calculation is connected to a Car.

        public async Task<PagedResultDto<CustomerListDto>> GetCustomers(GetCustomersInput input)
        {
            var searchWords = new string[] { };
            if (!input.Filter.IsNullOrWhiteSpace())
            {
                searchWords = input.Filter?.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries);
            }

            var query = _customerRepository
                 .GetAll()
                 .Include(p => p.Calculations)
                     .ThenInclude(cm => cm.Car)
                .WhereIf(input.CustomerTypeFilter != -1,
                    p => (int)p.CustomerType == input.CustomerTypeFilter
                );

            if (searchWords.Count() > 0)
            {
                var customerFilter = PredicateBuilder.New<Customer>();

                foreach (var word in searchWords)
                {
                    customerFilter = customerFilter.Or(customer => customer.CustomerName.Contains(word));
                    customerFilter = customerFilter.Or(customer => customer.AddressStreet.Contains(word));

                    customerFilter = customerFilter.Or(customer => customer.Calculations.Any(calculation => calculation.Car.Description.Contains(word)));
                }
                query = query.Where(customerFilter);
            }

            var customerCount = await query.CountAsync();

            var customers = await query
                .OrderBy(input.Sorting)
                .PageBy(input)
                .ToListAsync();

            var customerListDtos = ObjectMapper.Map<List<CustomerListDto>>(customers);

            return new PagedResultDto<CustomerListDto>(
                customerCount,
                customerListDtos
                );
        }

Hi maliming

isn't it possible for you :-) to extend on the IQueryable (I don't know how...)

But on ABP there is already some extends: WhereIf and PageBy - which extend IQueryable - and I suppose "translates" to proper linq/SQL:

Hi,

issue gone after update to Core, MVC, jQuery project - v9.0.1

Case closed :-)

Hi @ismcagdas

any news on these issues :-)

NB: also reference to #4115

Hi maliming

thank you - we have done it with the code below. To avoid "breaking" exsisting use of AppServices - we created a "HangfireUser" in each tenant, with the relevant roles/rights.

var tenants = _tenantRepository.GetAll();
foreach(var tenant in tenants)
{
    using (CurrentUnitOfWork.SetTenantId(tenant.Id))
    {
        if (_featureChecker.IsEnabled(tenant.Id, AppFeatures.XYZ))
        {
            var tenantUser = _userManager.Users.FirstOrDefault(u => u.UserName.ToUpper() == "HangfireUser");
            if (tenantUser != null)
            {
                using (_abpSession.Use(tenant.Id, tenantUser.Id))
                {
                    // DO PROCESS...

@bobingham,

thank you - works perfectly :-)

Showing 31 to 40 of 107 entries