public static void GetByid(long id) { using (var db = new ClientDbContext(DALContext.LoyaltyGenieWebDbConnectionString)) { List<PromotionCategories> promotioncategories=new List<PromotionCategories>(); //List<PromotionCategories> promotioncategories = db.PromotionCategories.Where(t => t.PromotionsId == id).ToList(); var p = (from s in db.PromotionCategories join x in db.QualifyOption on s.Id equals x.PromotionCategoryId into t from cat in t.DefaultIfEmpty() where s.PromotionsId == id select new { s.Id, s.PromotionsId, s.NumberofProducts, s.ActiveStatus, s.CreatedDate, s.ModifiedDate, s.CreatedBy, s.ModifiedBy, s.PromotionCategory, s.CategoryId, s.ProductId, cat.IsOption, cat.OptionId, cat.PromotionCategoryId }).ToList(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)