Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "aaron"

You can override ApplyAbpConcepts in your DbContextto create a new entity when an IFullAudited entity is modified. But just doing this won't work because primary key is unique. You will also have to handle relationships (foreign keys).

You can refer to the documentation on Extending Non-abstract Entities.

That's great. As a side note, this forum uses square brackets:

[code]Code goes here!

[/code:2pjwph53]

TenantId is only set to 1 (Default Tenant) by default in a single-tenant application.

Should you LoginAsTenant before calling CreateActionType?

Do it in your application service. This is how aspnetboilerplate does it:

public virtual async Task<IdentityResult> CheckDuplicateUsernameOrEmailAddressAsync(long? expectedUserId, string userName, string emailAddress)
{
    var user = (await FindByNameAsync(userName));
    if (user != null && user.Id != expectedUserId)
    {
        throw new UserFriendlyException(string.Format(L("Identity.DuplicateUserName"), userName));
    }

    user = (await FindByEmailAsync(emailAddress));
    if (user != null && user.Id != expectedUserId)
    {
        throw new UserFriendlyException(string.Format(L("Identity.DuplicateEmail"), emailAddress));
    }

    return IdentityResult.Success;
}
Answer

Just include:

var clients = _clientRepository
        .GetAllIncluding(
            c => c.Counterparty,
            c => c.ClientContact,
            c => c.Type,
            c => c.Nature,
            c => c.PurchaseManager,
            c => c.PurchasePerson,
            c => c.ContactPerson)
        .ToList();
Answer

That's correct. GetAllIncluding accepts params, so simply use one or more commas.

Answer
var clients = _clientRepository
        .GetAllIncluding(client => client.Counterparty)
        .ToList();

WebUrlServiceBase no longer has ITenantCache in its constructor.

Showing 1201 to 1210 of 1543 entries