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

Activities of "oguzhanagir"

Hi devteambiz

This time zone may not be up to date in the Windows version you are currently using.

You can try changing the content of the GetWindowsTimezones() method in the TimeZoneService class in the *.Core project as follows, it may help you solve this problem.

public List<NameValueDto> GetWindowsTimezones()
{
    var timezones = new List<NameValueDto>();

    var windowsTimezones = TZConvert.KnownWindowsTimeZoneIds;

    foreach (var windowsTimezone in windowsTimezones)
    {
        if (TZConvert.TryWindowsToIana(windowsTimezone, out var ianaTimezone))
        {
            timezones.Add(new NameValueDto
            {
                Value = windowsTimezone,
                Name = $"{ianaTimezone} ({GetTimezoneOffset(TZConvert.GetTimeZoneInfo(windowsTimezone))})"
            });
        }
    }

    return timezones.OrderBy(e => e.Name).ToList();
}

Additionally, comments here may be helpful to you.

Hi

The default conditions must be changed correctly to generate the documentation file.

Here, *.Mvc.csproj, *.Application.csproj and *.Web.Core.csproj should also be marked as True. After opening the files with .csproj extension, you can change them to True as shown in the screenshot below.

You need to make this change in the .csproj extension files of 3 projects.

Answer

Hi Bernard

Triggers the app.createOrEditPersonModalSaved event. event. This event is used to notify other parts of the application that a person has been successfully saved.

Example usage:

This is the part where the event is triggered.

abp.services.app.personService.createOrUpdate(input).done(function () {
        abp.event.trigger('app.createOrEditPersonModalSaved');
});

This is the part where the incident is heard.

abp.event.on('app.createOrEditPersonModalSaved', function () {
    // Refresh the person list or perform other actions
    refreshPersonList();
});

By listening to this event, you can take the necessary actions.

You can control your View State by adding an if condition to the Controller, AppService and Javascript: Example:

if (model.Id == null)
{
    // Create mode
    _personService.CreatePerson(model);
}
else
{
    // Edit mode
    _personService.UpdatePerson(model.Id, model);
}

Here you can check the View state in 3 different places and forward it to the relevant service method.

Answer

Hi Bernard

When you perform the Insert operation, await CurrentUnitOfWork.SaveChangesAsync(); Can you call the method? This step is required to get the Id.

Your new code will be like this:

protected virtual async Task<Person> Create(CreateOrEditPersonDto input)
{
    var person = ObjectMapper.Map<Person>(input);

    if (AbpSession.TenantId != null)
    {
      person.TenantId = (int?)AbpSession.TenantId;
    }

    person.Color = GenerateRandomColor();

    await _personRepository.InsertAsync(person);
    await CurrentUnitOfWork.SaveChangesAsync();
    
    return person;
}
Answer

Hi Bernard

Make sure that the Abp.AutoMapper package is installed in the project in which you want to use the AutoMapFrom attribute.

Answer

Hi Bernard

You need to define the [AutoMapFrom(typeof(Tache))] attribute in the CreateOrEditTacheDto class, and similarly, define the [AutoMapFrom(typeof(Person))] attribute in the PersonTacheDto class. A comprehensive explanation is provided in this document.

Thank you for your return. We will examine this situation.

Answer

Hi Bernard

You can correct the structure you applied in the OnModelCreating method according to your wishes. This is what you did before

modelBuilder.Entity()
    .HasMany(e => e.Taches)
    .WithMany(e => e.Persons)
    .UsingEntity("PersonTache");

 modelBuilder.Entity()
    .HasMany(e => e.Persons)
    .WithMany(e => e.Taches)
    .UsingEntity("PersonTache");

If you want to establish a One to Many relationship here, 2 definitions are not needed.

You can also do this in Entity classes, you can make more specific definitions in OnModelCreating.

The current definition you made in OnModelCreating creates a Many-to-Many relationship. This automatically creates the PersonTache entity.

Hi benjamin.edinger

Can you share the ConnectionString with us? Please censor important information. Here you can define the Max Pool Size setting according to your needs. This will probably solve your problem.

If the problem persists after you apply this, do not hesitate to contact us.

Answer

Hi Bernard

When using Include here, there is no need for Id synchronization, it does this automatically. Here, there are 2 Persons objects in the entity with ID 2.

Entity Framework uses dynamic proxies to support features such as lazy loading. These proxies typically use the ICollection implementation, and concrete types such as List may be incompatible with these proxies.

The ICollection interface keeps your code consistent when working with collections

ICollection represents an interface to a collection, which allows you to write more flexible code rather than a concrete implementation like List

Showing 141 to 150 of 166 entries