Base solution for your next web application

Activities of "epro1"

Hello,

I have problem with InsertOrUpdate method. I have created custom repository (I follow documentation). In that custom repository I have added one method where I get Entity by some parameters. The problem is now when I execute that method and then InsertOrUpdate method (from Base Repository) it gives me error:

Attaching an entity of type 'EntityName' failed because another entity of the same type already has the same primary key value.

Here is code:

public async Task Save(DetailsInput Input)
        {
            //check
            var country = _countryRepository.GetByPeriod(Input.DateFrom, Input.DateTo.Value);
            if (country != null && ((Input.Id.HasValue && taxRate.Id != Input.Id.Value) || !Input.Id.HasValue))
            {
                throw new UserFriendlyException(L("CountryForPeriodExists"));
            }
            
           Country  item  = Input.MapTo<Country>();
           await _countryRepository.InsertOrUpdateAsync(item);
            
        }

But if I remove that custom method and then try to execute InsertOrUpdate everthing is ok:

public async Task Save(DetailsInput Input)
        {
           Country  item  = Input.MapTo<Country>();
           await _countryRepository.InsertOrUpdateAsync(item);
            
        }

Is anyone know why this happens?

Thanks.

Hello,

I'm using . NET Boilerplate + Module Zero starter template. I have a question regarding to AuditLogs. I want to get list of all items from table AbpAuditLogs from Application layer. Can you help me and explain how can I implement this?

Many thanks.

Hello,

I have problem with loading localization values on Angular 2.X template. At first it works ok, but after some time I realized that I'm getting empty object as a response of method AbpUserConfiguration/GetAll:

I didn't change anything that is related to localization logic:

Can you tell me where in .NET core project is starting point of that request (for getting all configurations)? What can be the possible reason for that problem? Any help would be appreciated. Thanks.

Showing 1 to 3 of 3 entries