Beispiel #1
0
        public JewelryCategory Getcategory(JewelryCategory Category)
        {
            Context con = new Context();

            using (con)
            {
                return((from m in con.Categories
                        where (m.Id == Category.Id)
                        select m).FirstOrDefault());
            }
        }
Beispiel #2
0
        public List <Jewelry> GetJewelryByCateryId(JewelryCategory Category)
        {
            Context con = new Context();

            using (con)
            {
                return((from m in con.Jewelries
                        .Include("Category")
                        .Include("Type")
                        .Include("Images")
                        .Include("Color")
                        where (m.Category.Id == Category.Id)
                        select m).ToList());
            }
        }