if i have the following to access an sql database for a date to compare it to a string that a user enters:
public IQueryable<Audit> FindAllAuditsByNameDate(String name, String date)
{
return from audit in db.Audits
where audit.EventTime.ToString().Contains(date) && audit.User.UserName.Contains(name)
orderby audit.User.UserName
select audit;
}
it fails is the user enters the "/" character in a date. how do i work around this?