public List<FoodEntity> Get_List_Food_By_StoreID(string id) { List<FoodEntity> list = new List<FoodEntity>(); if (dbContext == null) { dbContext = new FoodDeliveryEntities(); } var listvar = dbContext.GET_LIST_FOOD_BY_STOREID(id).ToList(); foreach (var obj in listvar) { FoodEntity entity = new FoodEntity { FoodID = "" + obj.FoodID, FoodName = obj.FoodName, FoodImage = obj.FoodImage, Price = (decimal)obj.Price, CategoryID = "" + obj.CategoryID, StoreID=""+obj.StoreID }; list.Add(entity); } return list; }