public Task <IActionResult> FetchAllAssociations() { //Recupero la lista dal layer var entities = BasicLayer.FetchAllAssociations(); //Ritorno i contratti return(Reply(entities.As(x => ContractUtils.GenerateContract(x)))); }
public Task <IActionResult> FetchAssociationsNotAssignedForShooter(ShooterRequest request) { var associationIds = BasicLayer.FetchAllShooterAssociationInfos(request.ShooterId) .Select(x => x.AssociationId) .ToList(); //Recupero la lista dal layer var entities = BasicLayer.FetchAllAssociations(); //Ritorno i contratti return(Reply(entities.Where(x => !associationIds.Contains(x.Id)).As(ContractUtils.GenerateContract))); }