Hi, I have partly updated my app to V 1.8 and created separate branch for it as ver-1.8.I just updated all the nugget packages, db script changes and breaking changes.Now I can compile that branch and working fine.But I didn't do any manual changes which it requires to do on the Ui layer yet.I'll do those changes later hence it'll require lot of time and care.So my question is this,Is that OK to merge it into my Master branch (Production version) ? If I'll merge it into master then I can use git cherry pick option to commit my latest changes to ver-1.8 branch also until I'll complete the full version update. What is your thoughts ? Thanks.
Hi, Yes,me too talk about the server side caching.Thanks for the feedback.I got your point :)
Hi, Thanks for the feedback.But I didn't get what you said exactly.Could you give more info about that ? Thanks.
If you are making a separate AJAX call for each request, you may consider to unify it. I generally suggest to lazy load cache. : Yes,Now I have separate AJAX requests for each and every drop down.So could you explain it little bit about unify and lazy load cache here ?
if the first customer must not be waited, you can cache it in PostInitialize event of your module. : At this moment I have used loader animation until all the ajax calls are done.So can you explain what is this " cache it in PostInitialize event of your module" ? If you can show me a simple example,I'll highly appreciate it.Thanks.
<div busy-if="vm.loadingProperties></div>
Hi,
My SPA app's pop up is having around 30 drop downs.All the data are retrieving through the ajax calls as shown below. This pop up is very slow due to so many drop downs.Hence I would like to use redis cache with it.Is asp.net zero support redis cache out of the box (ver. v1.7.1.1 [20160328]) ? If I need to use redis cache for the above scenario can you suggest me the best way for doing it ? Do I need to run back end task to fill those data to the redis cache or which way is it good ? Thanks.
JS
vm.getAllCities = function () {
cityService.getAllCitiesAsync().success(function (result) {
vm.cities = result.items;
});
};
vm.getAllCities();
Html
<div class="col-xs-3">
<div class="form-group">
<label class="control-label">@L("City")</label>
<select id="cityDropDown" required
class="form-control"
ng-options="a.id as a.name + ' | '+ a.zipCode for a in vm.cities"
ng-model="vm.property.address.cityId"
ui-jq="selectpicker"
ui-options='{ iconBase: "famfamfam-flag", tickIcon: "fa fa-check" }'
ng-change="vm.changedCity(vm.property.address.cityId)"
data-live-search="true" title="@L("PfSelectCity")">
<option value=""></option>
</select>
</div>
</div>
C#
public async Task<ListResultOutput<CityListDto>> GetAllCitiesAsync()
{
var cities = await _cityRepository
.GetAllListAsync();
return new ListResultOutput<CityListDto>(cities.OrderBy(o => o.Name).MapTo<List<CityListDto>>());
}
When I use .AsNoTracking(), then it works fine on the first query.
var properties = _propertyRepository
.GetAll()
.AsNoTracking()
.Include(p => p.Address)
.ToList();
But then the problem is on MapTo line.Could you tell me how to sort it out ? Thanks.
var results = new List<PropertyListDto>(properties.OrderBy(p => p.Id).MapTo<List<PropertyListDto>>());
This is the error :
{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
Mapping types:
Property_A048C3D093990BB6A086B710BAC90CB35FD4BAB180FC02FA3E90053FE58F20D3 -> ICollection`1
System.Data.Entity.DynamicProxies.Property_A048C3D093990BB6A086B710BAC90CB35FD4BAB180FC02FA3E90053FE58F20D3 -> System.Collections.Generic.ICollection`1[[IP.Comments.Dtos.CommentEditDto,IP.Application, Version=1.7.1.1, Culture=neutral, PublicKeyToken=null]]
Destination path:
List`1[3126].Comments3126[3126].Comments3126[3126]
Source value:
[Property_A048C3D093990BB6A086B710BAC90CB35FD4BAB180FC02FA3E90053FE58F20D3 3166]
Hi, This is actually not related to the asp.netzero. But hope you can give a better solution for me with your vast experience.
public List<PropertyListDto> GetPropertiesByStatus(GetPropertyInput input)
{
//exception occurs here
var properties = _propertyRepository
.GetAll()
.Include(p => p.Address)
.ToList();
var results = new List<PropertyListDto>(properties.OrderBy(p => p.Id).MapTo<List<PropertyListDto>>());
return results;
}
[AutoMapFrom(typeof(Property))]
public class PropertyListDto : FullAuditedEntityDto
{
public new int Id { get; set; }
public CountyListDto County { get; set; }
public string Priority { get; set; }
public string Dist { get; set; }
public decimal ListingPrice { get; set; }
public string Blk { get; set; }
public AddressDto Address { get; set; }
public string Contact { get; set; }
public string Lot { get; set; }
public decimal Taxes { get; set; }
public string Mls { get; set; }
public ICollection<CommentEditDto> Comments { get; set; }
public int? LegacyId { get; set; }
}
Q : I need to show around 100,000 (1 lakh) data on the Angular UI Grid.But the problem is, above query gives memory exception.So could you tell me how to sort out this issue ? Thanks.
Note : I need to show the data without pagination.So I have selected this UI Grid.
[http://ui-grid.info/docs/#/tutorial/404_large_data_sets_and_performance])
Hi Halil,
Thanks a lot.I have found out 3rd too.That is hide the header,sidebar and footer by using CSS ;)
.page-sidebar-wrapper, .page-header, .page-footer {
display: none !important;
}
Hi,
app.js
$stateProvider.state('tenant.propertyGoogleMap', {
url: '/PropertyGoogleMap',
templateUrl: '~/App/tenant/views/propertymanagement/propertyGoogleMap.cshtml',
menu: 'PropertyGoogleMap.Tenant'
});
js
Here I have loaded the new browser window tab when user clicks the button.
vm.propertyGoogleMap = function () {
var url = $state.href('tenant.propertyGoogleMap', {}, { absolute: false });
$window.open(url, '_blank');
};
propertyGoogleMap.cshtml
I have tried with the null as shown below.But still it is being loaded the menus and etc. Why's that ?
@{
Layout = null;
}
<div ng-controller="tenant.views.propertymanagement.propertyGoogleMap as vm">
<style type="text/css">
.angular-google-map-container {
height: 400px;
}
</style>
<div class="row">
<ui-gmap-google-map center="vm.map.center" zoom="vm.map.zoom" options="vm.options"></ui-gmap-google-map>
</div>
</div>
So my question is,could you tell me how can I load the new tab window without the layout page details ? I mean without menus and etc.. If I want, I can load angular and other related js files on that page (propertyGoogleMap.cshtml) manually.Thanks.
Hi Halil, Yes,that is the case.I think you have selected a wrong api for the Angular SPA.If we access the dom elements within the controller is very BAD practice. It's called angular anti pattern.I hope this must have a performance issues also with the big list of items due to usage of almost dead library such as Jquery. Hope you'll remove this and will use AngularJS native version of search drop downs in your future versions of Asp.net Zero.I'll put an issue about this on Git also.Thanks.
Hi, Could you tell me why do we need to refresh the drop down as shown below ? Do we need to do that always ? Thanks.
setTimeout(function () {
$('#LanguageIconSelectionCombobox').selectpicker('refresh');
$('#LanguageNameSelectionCombobox').selectpicker('refresh');
}, 0);