Activities of "sean.alford"

@hikalkan, I am trying to ignore the AppUser ExtraProperties, but I'm still receiving this error. I think, it's because the Ticket entity has a navigation link to a AppUser.

However, I cannot ignore the ExtraProperties in the Dto CreateMap<Ticket, TicketDto>().Ignore(x => x.Assignee.ExtraProperties); because x (TicketDto) does not contain Assignee.

@alpher,

I followed your previous instructions, however when I try to add a migration I get the following error. I think I need to somehow ignore the ExtraProperties for the navigation LookupDtos.

AutoMapping

**Migration Error **

@Alper,

I created the following files based on the Gist you created. I'm assuming all of them with exception to EfCoreSequentialNumberRepository belong in the Domain project.

I guess the next step is to add the following DBContext items create and delplay a new migration.

SupportDbContext.cs public DbSet<SequentialNumber> SequentialNumbers { get; set; }

SupportDbContextModelCreatingExtensions.cs

builder.Entity<SequentialNumber>(b =>
{
	b.ToTable(SupportConsts.DbTablePrefix + "SequentialNumbers", SupportConsts.DbSchema);
	b.ConfigureByConvention();

	b.Property(x => x.TenantId).HasColumnName(nameof(SequentialNumber.TenantId));
	b.Property(x => x.SequenceName).HasColumnName(nameof(SequentialNumber.SequenceName)).IsRequired();
	b.Property(x => x.CurrentValue).HasColumnName(nameof(SequentialNumber.CurrentValue)).IsRequired();
    
    b.HasIndex(x => new { x.TenantId, x.SequenceName }).IsUnique().HasFilter(null);

});

Since Domain services (implement IDomainService interface) are registered as transient automatically the next step is to inject an ISequentialNumberManager into the CreateModal.

private readonly ISequentialNumberManager _sequentialNumberManager;

public CreateModalModel(ITicketAppService ticketAppService, ISequentialNumberManager sequentialNumberManager)
{
	_tagAppService = ticketAppService;
	_sequentialNumberManager = sequentialNumberManager;

}

Finally, we set the Ticket.Number in OnPostAsync() prior to posting.

public async Task<IActionResult> OnPostAsync()
{    
    Ticket.Number = await _sequentialNumberManager.GetNextAsync("Ticket");
	await _tagAppService.CreateAsync(Ticket);
	return NoContent();
}

Thanks for your amazing support on this one @Alper!

@alper thanks! This helps a lot! I was thinking a domain service was more complicated.

ABP Suite should not allow an Entity to contain a Property with the same name.

@alper, it appears that @hikalkan has plans to provide documentation, and probably examples for domain services. I'm not sure why these questions would be out of context. Maybe a full working example is out of context, but I'm not sure where I'd find basic coding example for creating ABP domain services on the internet. I'll admit you guys are very smart and what seems basic to you may not be basic to us ABP newbies. Furthermore, we are willing to pay for professional services if that is required. Would you please have someone help us with this or send us a quote for professional services?

FYI: The Quetion Assignee & Creator filters do not seem to be working like it used to. Note, I was logged in.

@alper,

Can you please elaborate on your previeous SequentialNumberRepository post, and provide a working example? I'm sure this example would be useful for others, and I'll also include and expalin this techneqe in the Acme.HelpDesk tutorial.

  • How would you wire this up to a specific entity property Ticket.Number (i.e. javascript, code-behind)

  • How would you handle the case when the entity insert fails? Would you simply skip that seq #, or should the SequentialNumberRepository provide a Decrement() method for this case? I'd vote for simply skipping that seq #, because providing a Decrement() option opens a whole new set of potential issues/problems.

  • Finally, is it okay to make the target property an index field to ensure it's unique? (i.e. b.HasIndex(x => new {x.TenantId , x.Number}).IsUnique(true);)

@edirkzwager, I don't see where you deleted the abo suite folder c:/users/username/.abp/suite

Make sure you delete that folder before trying to install abp suite.

@alper, MVC

Showing 21 to 30 of 51 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13