i have two list list content listearticle and this the code of this list:

 model = (
     from article in db.Article
     select new
     {
        ID = article.ID,
        ARTICLE = article.CODEARTICLE,
        PRIX= article.PRIX,
        STOCK=article.STOCK,
        IMAGE = article.Image,
        DESCRIPTION= article.REFERENCE,
     });

and another content list convention and this is the code :

  var query = (
         from article in db.convention
         select new
         {
              ID = article.ID,
              ARTICLE = article.CODEARTICLE,
              PRIX = article.Prix,
         });

i want to have a list listarticleconvention like this:

select listarticle from model if any article from list model exist in listconvention then Prix=query.Prix else Prix=model.Prix

Related posts

Recent Viewed