Adding custom templates is on road map. (high priority)
Hi @CyklusSoftware,
Here are the steps:
public class LocationListDto
{
public LocationDto Location{ get; set; }
public string LocationCategoryName { get; set; }
}
public async Task<PagedResultDto<LocationListDto>> GetAll(GetAllLocationsInput input) //Also modify ILocationAppService
{
var isFilterNullOrEmpty = string.IsNullOrEmpty(input.Filter);
var locations = _locationRepository.GetAll().WhereIf(!isFilterNullOrEmpty, d => true); // insert your filter here
var locationCategories= _locationCategoryRepository.GetAll(); // inject locationCategoryRepository in constructor
var query = (from l in locations
join lc in locationCategories on l.LocationCategoryId equals lc.Id into gj
from subpet in gj.DefaultIfEmpty()
select new LocationListDto() {Location= ObjectMapper.Map<LocationDto>(l), LocationCategoryName = subpet == null?"": subpet.Name});
var totalCount = await query.CountAsync();
var locationsSortedAndPaged = await query
.OrderBy(input.Sorting ?? "location.id asc")
.PageBy(input)
.ToListAsync();
return new PagedResultDto<LocationListDto>(
totalCount,
locationsSortedAndPaged
);
}
{
targets: 2, // set your own target value
data: "locationCategoryName"
}
{
targets: 1,
data: "location.myField" // old version was data:"myField" . We added "location.". You have to do it for all existing fields
}
<th>@L("LocationCategoryName")</th>
Thats all. It should work if i didn't forget to paste any code.
- Its AspNet Zero project only, We have modified it a bit according to our requirement.
Are you sure? You've sent us a project that only contains a textbox that auto-completes the words. And we didn't get what we supposed to do with it.
Hi @ dparizek , thanks for the feedback.
'Generating from existing entity' feature is on our long-term road map.
Unfortunately tool doesn't support pre-5.0 versions. However, you can use many parts of generated code by carrying them to your own project.
Edit: version info corrected.
Hi,
If you can successfully build manually, problem may be related to visual studio. Is there any warning before "Running add-migration"?
By the way, we've fixed the bug that causes DirectoryNotFoundException when a file not found. (you can update vs extension to 1.2.3) Could you please update it and try again?
hi, @faisalalam
I'm sorry but no date yet.
- Allow for maxchar definition in database.
I don't get what you mean. You can set nvarchar(x) by filling maxlength field, and nvarchar(max) by not filling it.
@vladsd
Words that are localized by tool (property name, entity name etc) should be usually simple words and has same meaning everywhere. I am not sure why you need this.
However, we may discuss that and give a prefix option for localization in next versions.
Hi andmattia,
You can create a new github issue in aspnet-zero-core repository and explain what happens if camel case is used for namespace.
Hi,
Deleting and recreating DB doesn't break your license. Please contact to <a href="mailto:[email protected]">[email protected]</a> about this problem.