Base solution for your next web application

Activities of "Bernard"

Question

Hi,

I add following implementation : https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Feature-Dynamic-Entity-Parameters-Custom-Input-Types-Mvc

But how does this field work is asp Core project any example ?

Thks

Answer

Thks for explanation

So, I have a stupid question how to add a task to the person entity without having a PersonTache entity in the dbcontext. The table was created by itself in the database

This way (mapping from multiselect field and) ?

public class CreateOrEditTacheDto : EntityDto<int?> {

 [Required]
 [StringLength(TacheConsts.MaxIntituleLength, MinimumLength = TacheConsts.MinIntituleLength)]
 public string Intitule { get; set; }

 public DateTime Echeance { get; set; }

 public Priorite Priorite { get; set; }

 public TypeTache TypeTache { get; set; }

 public long UserId { get; set; }

 public List&lt;PersonDto&gt; Persons { get; set; }

}

Answer

Well seen **oguzhanagir **!

But don't understand the id is the same (2)

i understand the problem is ICollection instead of List in each Entity

Answer

Hi @m.aliozkaya,

For the 2 cases the results are 0

And same result for searching Tasks (tache in french) in personappservice :

var dbListPerson = _personRepository.GetAllIncluding(x => x.Taches).Where(x => x.Id == input.Id).ToList(); var dbListPerson2 = _personRepository.GetAllIncluding(x => x.Taches).FirstOrDefault(x => x.Id == input.Id);

Answer

Hi

Thks for quick answer If you look above it is the same code as you var dbList = _tacheRepository.GetAllIncluding(x => x.Persons).Where(x => x.Id == tache.Id);

But no data is returned for person entity

Question

Hi,

I have a many to many relation entity for Person and Tache (task in English) but the Persons data in not displayed when calling the task entity ?

Person Entity : ...... public List<Tache> Taches { get; set; }

Tache Entity

public List<Person> Persons { get; set; }

Request :

var dbList = _tacheRepository.GetAllIncluding(x => x.Persons).Where(x => x.Id == tache.Id); var dbList2 = _tacheRepository.GetAll().Include(x => x.Persons).Where(x => x.Id == tache.Id);

the model creating

` modelBuilder.Entity

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

database

Any idea ?

Thks

Answer

Hi It’s not a modal view

Answer

Hi Yes from server From App.Services CreateOrEdit method do you mean ?

I would like returned entity Id without closing view to be able to add related other entities

For example Person Id for passing id to quote entity foreign Key person.id in same view without closing it

This for help and example

Question

HI,

is possible to get Id of new recorded entity in call back ? ` _personsService.createOrEdit( person ).done(function () { abp.notify.info(app.localize('SavedSuccessfully')); abp.event.trigger('app.createOrEditPersonModalSaved');

 if (typeof (successCallback) === 'function') {
     successCallback();
 }

}).always(function () { abp.ui.clearBusy(); });`

Question

Hi,

is it possible to create permissions for an entity with doesn't exist in database ? For example i have an entity Persons with child Controller Named Contact and like to create permissions for contacts with own controller and views

Showing 21 to 30 of 134 entries