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

Activities of "dexmox"

Hi Again,

Thanks in advance.

What would cause throw new UserFriendlyException to not display a popup with the message in one section of my app but show the popup in another ?

They both log to log.txt

@demirmusa - thanks, for your assistance the cause was automapper higher up the chain - I added a collection to a dto earlier, forgot about it and automapper just included it. Thank you again.

Yep, only being called once via abp.services.app.xxx AppService gets only one object from input, and loops only once and inserts 3.

Edit -- sorry it is in a for loop and the input is only one object being passed in, will update the original post too.

foreach (var resInput in input.ResLinks)
{    
    var res = new ResLinkDto
    {
        TenantId = AbpSession.TenantId.Value,    
        ModelOneId = resInput.modelOneId,            
        ModelTwoId = resInput.modelTwoId,
        ModelThreeId = resInput.modelThreeId.    
    };
    
    await _resLinkRepository.InsertAsync(ObjectMapper.Map<ResLink>(res));
}

Issue: AppService is inserting 3 rows instead of one.

What I am trying to achieve is a link table for many to many relations between 3 entities. It appears to be creating one of each type of link between the three entities,

A true fale A false true A true true

But I dont understand why, any assistance would be greatly appreciated and thanks in advance. I believe this may have more to do with EF Core but I am not sure whats wrong here.

public class ModelOne : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ModelTwo : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ModelThree : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        public virtual ICollection<ResLink> ResLinks { get; set; }
}
public class ResLink : FullAuditedEntity<long>, IMustHaveTenant
{
        public virtual int TenantId { get; set; }
        
        public virtual long? ModelOneId { get; set; }
        public virtual ModelOne ModelOne { get; set; }
   
        public virtual long? ModelTwoId { get; set; }
        public virtual ModelTwo ModelTwo { get; set; }
        
        public virtual long? ModelThreeId { get; set; }
        public virtual ModelThree ModelThree { get; set; }      
}
public async Task CreateResLink(CreateResInput input) {
    foreach (var resInput in input.ResLinks)
    {    
        var res = new ResLinkDto
        {
            TenantId = AbpSession.TenantId.Value,    
            ModelOneId = resInput.modelOneId,            
            ModelTwoId = resInput.modelTwoId,
            ModelThreeId = resInput.modelThreeId.    
        };

        await _resLinkRepository.InsertAsync(ObjectMapper.Map<ResLink>(res));
    }
}

Insert Result: ID Date User Id M.Date M.User IsDeleted D.Uid D.Time TenantId ModelOneId ModelTwoId ModelThreeId 30050 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 1 NULL 180026 30051 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 NULL 1 180026 30052 06/08/2019 13:26:54 6 NULL NULL False NULL NULL 1 1 1 180026

Power Tools 2.0.2.1 - Is it possible to create views only from manually created Model/Entity

Example:

  1. Created an entity without powertools.
  2. Created API without powertools
  3. Want to generate index, edit, create

Let me know if i need to be more specific about what i am trying to achieve.

Could someone please tell me what the benefits and differences are and which is better to use for doing ajax table updates and why ?

_personService.createPerson(person).done(function () {
                _modalManager.close();
                 // some ajax table updates and stuff here
            }).always(function () {
                _modalManager.setBusy(false);
            });

https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Saving-Person

VS

abp.ajax({
    url: '/People/SavePerson',
    data: JSON.stringify(newPerson)
}).done(function(data) {
    abp.notify.success('Created new person with id = ' + data.personId);
    // some ajax table updates and stuff here
});

https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX

Thanks in advance.

When will V7 be ready for download from aspnetzero site as it has been completed in github ?

Thanks in advance.

Hi All,

I have looked through the forum for an example but I dont understand how to implement it.

Could someone please provide some detailed steps for importing and using the external-events from metronic into angular SPA?

Thank you kindly in advance for any and all assistance.

Kindest Regards, Dex

Hi All,

Thank you in advance.

I am looking for the best way to include Idle Timer / Session Timeout into an Angular + Core Zero project.

What is the best way to handle logout after a session time is reached - configurable per tenant (stored in a settings table) that will display a lockout modal and stop any further action / navigation until they log back (including if they press refresh).

If anyone could provide an example / provide a link to an implementation or point me the general direction.

Thank you kindly. Regards. Dex.

Showing 41 to 49 of 49 entries