public async Task<ListResultDto<ProvinceListDto>> GetProvinces(GetProvincesInput input) { var provinces = await _provinceRepository .GetAll() .WhereIf( !input.Filter.IsNullOrEmpty(), p => p.Name.Contains(input.Filter) ) .OrderBy(p => p.Name) .ToList(); return new ListResultDto<ProvinceListDto>(provinces.MapTo<List<ProvinceListDto>>()); }
ToList does not return a Task, so it cannot be awaited. You can inject IAsyncQueryableExecuter and do:
public async Task<ListResultDto<ProvinceListDto>> GetProvinces(GetProvincesInput input)
{
var query = _provinceRepository
.GetAll()
.WhereIf(
!input.Filter.IsNullOrEmpty(),
p => p.Name.Contains(input.Filter)
)
.OrderBy(p => p.Name);
var provinces = await AsyncQueryableExecuter.ToListAsync(query); // This line
return new ListResultDto<ProvinceListDto>(provinces.MapTo<List<ProvinceListDto>>());
}
Tip: Wrap your code in the following for formatting and readability:
[code]
[/code:28rmc8yk] A shortcut is to highlight your code and click on the </> button in the formatting toolbar.
You can inject IClientInfoProvider and use it like this:
var browserInfo = ClientInfoProvider.BrowserInfo;
var clientIpAddress = ClientInfoProvider.ClientIpAddress;
var clientName = ClientInfoProvider.ComputerName;
Can you show the error in Logs.txt?
Can you show the error in Logs.txt?
Issue closed: https://github.com/aspnetzero/aspnet-zero/issues/582
Changelogs for:
<cite>ismcagdas: </cite> change logs [on the official website] are for non-customers. For our customers it is better to track changes in github
How to migrate existing solution: https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697
Problem 2: When opening the HostSettings page, I get the following error: InvalidTimeZoneException: "Sudan Standard Time" was not recognized as a valid IANA time zone name, or has no equivalant Windows time zone. TimeZoneConverter.TZConvert.IanaToWindows(string ianaTimeZoneName)
The only thing I found on the net was that Sudan changed its time zone 4 weeks ago. https://support.microsoft.com/en-in/help/4051956/time-zone-and-dst-changes-in-windows-for-northern-cyprus-sudan-and-ton
Solution: no idea :-(
Solution: Install KB4051956 on the Windows computer. (Source)
Problem 4: In the mvc project Iam not able to compile the css files. I tried Web Compiler -> Re-compile. Web-Compiler Output is: Web Compiler found an error in compilerconfig.json Not more messages or errors. But I must also say that I have no experience with the Web Compiler. I don't know what I'm doing wrong. But I really need to get rid of the (my opinion) ugly purple ;-). I changed the brand-color in _config.scss (metronic documentation)
Solution: no idea :-(
Related issue: https://github.com/aspnetzero/aspnet-zero-core/issues/612
It returns a Promise. You can use Client Proxies like that:
abp.services.app.address.getAddresByString("Bukingham palace, england").done(function (result) {
console.log(result);
});
It's a problem that AutoMapper has with ORMs when trying to map an IQueryable to a List. Related issue: https://github.com/AutoMapper/AutoMapper/issues/1517
In this case, even if it worked, it was unnecessary overhead to perform a Map since you already had MyChildEntityDetailsDto.