public FavoriteModel DeleteFavorite(FavoriteModel item)
        {
            FavoriteModel dbEntry = context.Favorites.FirstOrDefault(i => i.FavoritesID == item.FavoritesID);

            context.Remove(dbEntry);
            context.SaveChanges();
            return(dbEntry);
        }
        public int SaveFavorite(FavoriteModel item)
        {
            int temp = this.Items.Where(i => i.Username == item.Username).Where(i => i.ItemID == item.ItemID).Count();

            //if((context.Favorites.FromSqlRaw("Select Username, ItemID FROM dbo.Favorites WHERE username = '******' AND itemId = '" + item.ItemID + "'")).Count() > 0)
            //{

            //}
            if (temp > 0)
            {
                if (item.ItemID == null || item.Username == null)
                {
                    return(2);
                }
                return(0);
            }
            else
            {
                context.Add(item);
                context.SaveChanges();
                return(1);
            }
        }