using System.Linq;
using Microsoft.EntityFrameworkCore;
using QueryingDemo.Model;

namespace QueryingDemo.Samples
{
    public class Sample2 : ISample
    {
        public int Number => 2;
        public string Title => "SELECT with LIKE";

        public void Run(NorthwindContext dc)
        {
            var result = dc.Products
                .Where(p => EF.Functions.Like(p.ProductName, "%a%"))
                .ToList();
        }
    }
}