Hi,
I need to make the service method call synchronously. How can I do that? For example below code gets all the variants from ProductAppService. I want until this call completes, it should not execute the code below this.
One possible way that I know is using $.ajax where I can specify to make the call synchronous. But I was wondering, if there is way to make the call synchronously in below code.
//Get all the variants var _ProductService = abp.services.app.product; var ProductKey = $("#Id").val(); abp.ui.setBusy(); _ProductService.getVariants(ProductKey).done(function (result) { Variants = result; showVariants(); }).always(function () { abp.ui.clearBusy(); });
Regards, Mahendra
Hi,
Please don't bother on my above issue. It has been fixed now...
Hi,
I have written a function in the <MyApplication>RepositoryBase class that takes List of entity (List<Product> NewProducts) as input parameter. And following is the code of the function. Essentially, I am trying to bulkinsert products in the database. But in the last line of the code (i.e. Context.BulkSaveChanges();), it throws the following error: Exception: KeyNotFoundException Message: The given key was not present in the dictionary.
Context.ChangeTracker.AutoDetectChangesEnabled = false;
Context.Set<Product>().AddRange(NewProducts);
Context.ChangeTracker.DetectChanges();
Context.BulkSaveChanges();
Any idea what could be the reason and how to resolve this?
Regards, Mahendra
Thanks for the suggestion, we are now implementing the same.
Seed method is working well for the host but not for the tenants in .net core. Can you please suggest some alternatives.
We have changed the default behavior as we would like to user to login within 30 days of expiry, however he will see only the payment screen and unless he has paid cannot goto any other controller page.
Hi,
I want to write the below given common code in all the methods which return ActionResult in my controller. There are about 100 controllers in my application. What is the best way to handle this?
var currentloginInfo = RequestSessionCache.GetCurrentLoginInformationsAsync().Result;
if (currentloginInfo.Tenant.GetSubscriptionExpiringDayCount() < 0)
{
return RedirectToAction("SelectEdition", "SubscriptionManagement", new { editionPaymentType = "Upgrade" });
}
Regards, Abinesh
Hi,
I am using the default in-memory caching that is available in your framework. The question is: Is Caching happens per tenant or it will be shared among tenants. My observation is it is getting shared among tenant. If that's the default behavior, whats the best way to achieve caching per tenant?
Regards, Mahendra
Hi All,
We have a situation where we have added a field in the existing table and we want to insert a record in that table in all the tenants. This new record is to be inserted in all the existing 500 tenants. What is the preferred way of doing so. Please help with the code snipete if possible.
Thanks in Advance
Hi,
The GetScripts function failed to load the resource on Safari browser on Mac. While the same is working on safari browser on Windows machine.
If you want to see the live example I can send you the URL, UserId and Password. Could you please let me know your email address and I will send you the credentials...
Regards, Mahendra