Base solution for your next web application

Activities of "ismcagdas"

Hi,

Which version of ABP is referenced in your project ?

Hi,

If user with id 1 does not belong the same Tenant/Host with logged in user, you cannot see CreatorUserName. Can you confirm that, logged in user and user with id 1 belongs to same tenant or host.

If this is not the case, then we will investigate further.

Answer

Hi,

Can you share your js & cshtml files in order to check problem. Do you see any script error when open chrome developer console ?

Is your search button html <a> element ? If so, it's href property might be causing the problem.

Answer

Hi,

If you also dont want to send Id field to client, dont derive from any class. You can define Salelistdto as a simple class.

If you can share your Salemast class i can check for the TenantId being 0 problem.

You can also check documentation about Entities & DTOs, it might be helpful as well.

<a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Entities">http://aspnetboilerplate.com/Pages/Documents/Entities</a> <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Data-Transfer-Objects">http://aspnetboilerplate.com/Pages/Docu ... er-Objects</a>

Hi,

We will think of it,

Thanks for the idea.

Hi,

Your code seems correct. Can you check items in blogComments to see if their CreatorUser is not null and contains Name field as well.

Since CreatorUserId is nullable, CreatorUser in your case might be null.

Answer

Hi,

You derive your DTO from FullAuditedEntityDto. Because of that, properties you marked with red are added to json result. You should derive your Salelistdto from EntityDto in order not to send those properties to client.

If you also dont want to send TenantId to client, you can remove it from your dto.

If you want to send TenantId to client, can you share Salemast dto? So we can try to understand problem better.

Hi,

You can find tutorial for extending entities here <a class="postlink" href="http://aspnetzero.com/Documents/Extending-Existing-Entities">http://aspnetzero.com/Documents/Extendi ... g-Entities</a>. For the example Edition entity is used :)

I hope this helps.

Answer

Hi,

I assume that this method is in an application service. If it is, you should not return your Entity to client. Instead you should use a dto object like PatientBodyImageDto.

An example update might be like:

public async Task<PatientBodyImageDto> PostSetPatientBodyImageStateAsync(IdInput input)
{
    PatientBodyImage patientBodyImage = await _patientBodyImageRepository.GetAsync(input.Id);

    Logger.Debug("Setting a new image state async: " + input.Name);
    
    patientBodyImage.State = PatientBodyImageStates.Approved;
    
    var update = await _patientBodyImageRepository.UpdateAsync(patientBodyImage);

    return update.MapTo<PatientBodyImageDto>();
}

You have to create PatientBodyImageDto class and put an attribute on it for AutoMapping.

[AutoMapFrom(typeof(PatientBodyImage))]

I hope this helps.

Answer

Hi,

You can download module zero template here <a class="postlink" href="http://aspnetboilerplate.com/Templates">http://aspnetboilerplate.com/Templates</a> Ensure that the checkbox at 3. step is checked.

Showing 12511 to 12520 of 12536 entries