I'm doing a search function in WebAPI but it only returns the item if it's correct accordingly to the XML data. For example, it will only return the item if I write "Milk" or "Apple". How can I make it return these items if I write "milk", "apple" or maybe "aPpLe"?
Controller:
public IHttpActionResult GetItems(string name)
{
List<Item> allItems = GetAllItems();
return Ok(allItems.Where(i => i.Name.Contains(name)));
}