LearnABPFramework.com » All Topics https://www.learnabpframework.com/topics/feed Fri, 13 Mar 2026 07:48:21 +0000 https://bbpress.org/?v=2.6.9 en-AU https://www.learnabpframework.com/community/topic/please-help/ <![CDATA[Please help?]]> https://www.learnabpframework.com/community/topic/please-help/ Tue, 07 Jun 2022 01:31:55 +0000 Gary Medina Replies: 1

I am trying to learn the ABP Framework. I am able to get a simple minimalist app-nolayers running but I cant grasp how ABP handles relationships. I shared my app on Github here – https://github.com/garymedina/LearningABPFramework. I am getting a null reference exception in the BuildingUnitAppService.GetListAsync, code below.

Any help is greatly appreciated!!!

Thank you,
Gary

——-Code——–

using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using VrvApp.Entities;
using VrvApp.Services.Dtos;

namespace VrvApp.Services;

public class BuildingUnitAppService : ApplicationService
{
private readonly IRepository<BuildingUnit, Guid> _buildingUnitRepository;
private readonly IRepository<Building, Guid> _buildingRepository;

public BuildingUnitAppService(IRepository<BuildingUnit, Guid> buildingUnitRepository)
{
_buildingUnitRepository = buildingUnitRepository;
}

//public async Task<List<BuildingUnitDTO>> GetListAsync()
//{
// var items = await _buildingUnitRepository.GetListAsync();
// return items
// .Select(buildingUnit => new BuildingUnitDTO
// {
// Id = buildingUnit.Id,
// UnitNo = buildingUnit.UnitNo
// }).ToList();
//}

public async Task<List<BuildingUnitDTO>> GetListAsync()
{
//Get the IQueryable<Book> from the repository
var queryable = await _buildingUnitRepository.GetQueryableAsync();

//Prepare a query to join books and authors
var query = from buildingUnit in queryable
join building in await _buildingRepository.GetQueryableAsync() on buildingUnit.BuildingId equals building.Id
select new { buildingUnit, building };

//Execute the query and get a list
var queryResult = await AsyncExecuter.ToListAsync(query);

//Convert the query result to a list of BookDto objects
var buildingUnitDtos = queryResult.Select(x =>
{
var buildingUnitDto = ObjectMapper.Map<Building, BuildingUnitDTO>(x.building);
buildingUnitDto.Building = x.building;
return buildingUnitDto;
}).ToList();

return buildingUnitDtos;

}

public async Task<BuildingUnitDTO> CreateAsync(
string unitNo)
{
var buildingUnit = await _buildingUnitRepository.InsertAsync(
new BuildingUnit
{
UnitNo = unitNo
}
);

return new BuildingUnitDTO
{
Id = buildingUnit.Id,
UnitNo = buildingUnit.UnitNo
};
}

public async Task DeleteAsync(Guid id)
{
await _buildingUnitRepository.DeleteAsync(id);
}

}

]]>
https://www.learnabpframework.com/community/topic/blazor-vs-mvc-razor-for-new-projects/ <![CDATA[Blazor vs. MVC Razor for new projects]]> https://www.learnabpframework.com/community/topic/blazor-vs-mvc-razor-for-new-projects/ Tue, 22 Feb 2022 17:26:57 +0000 Kevin Farrow Replies: 2


Warning: Cannot modify header information - headers already sent by (output started at H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\bbpress\includes\topics\template.php:657) in H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\crayon-syntax-highlighter\crayon_wp.class.php on line 220

I’m starting a new project using abp.io framework, having used Zero (MVC) for a number of years, and was wondering whether to create this new project using tried and trusted MVC with Razor, or move over to the shiny new Blazor framework.

What does everyone think?

]]>
https://www.learnabpframework.com/community/topic/removing-theming-got-blazor-app/ <![CDATA[Removing theming got Blazor app]]> https://www.learnabpframework.com/community/topic/removing-theming-got-blazor-app/ Thu, 20 May 2021 14:40:38 +0000 Ian Gold Replies: 0


Warning: Cannot modify header information - headers already sent by (output started at H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\bbpress\includes\topics\template.php:657) in H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\crayon-syntax-highlighter\crayon_wp.class.php on line 220

In order to take control of the Blazor user interface I would like to bypass theming and simply do to a page that I have complete control over as our UI involved more than the standard interface provided. Can you help with this?

]]>
https://www.learnabpframework.com/community/topic/debug-automagically-generated-api/ <![CDATA[Debug automagically generated API]]> https://www.learnabpframework.com/community/topic/debug-automagically-generated-api/ Sat, 30 Jan 2021 08:14:38 +0000 Oleksandr Borovenskyi Replies: 1


Warning: Cannot modify header information - headers already sent by (output started at H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\bbpress\includes\topics\template.php:657) in H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\crayon-syntax-highlighter\crayon_wp.class.php on line 220

I have AppService that exposes API. Without controller.
How can I debug AppService while running the project “Http.Api.Host” where controllers are placed?

]]>
https://www.learnabpframework.com/community/topic/the-use-of-manager/ <![CDATA[The use of manager]]> https://www.learnabpframework.com/community/topic/the-use-of-manager/ Mon, 14 Dec 2020 14:17:18 +0000 mads Christiansen Replies: 1


Warning: Cannot modify header information - headers already sent by (output started at H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\bbpress\includes\topics\template.php:657) in H:\root\home\vnetonline-001\www\learnabp\wp-content\plugins\crayon-syntax-highlighter\crayon_wp.class.php on line 220

Hi,

I have bit of a struggle understanding why it is a quite big implementation of the “Author” manager to get things working in the bookstore tutorial.

Is it beacuse it is following the conventions strictly of ddd or is it possible to just use the appservices to handle these things and leave out the managers. Will it hurt me later?

I hope my question makes sense

Br Mads

]]>