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<PersonDto> Persons { get; set; }
}
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);
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
Hi It’s not a modal view
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
Hi, thanks it works fine
Hi
Thks
Hi Thks