Dear All,
I am trying to read customers who have their birthdays today.
var customers = await this.context.Customers.Where(item=>item.DOB != null && ((DateTime)(item.DOB.Value)).Day == currentdate.Day && ((DateTime)(item.DOB.Value)).Month == currentdate.Month).ToListAsync();
Unfortunately it is not working.
public class Customer
{
public int CustomerID { get; set; }
[Column(TypeName = "Date")]
public DateTime? DOB { get; set; } // Meaning date of Birth of the user
}I dont know what the problem is.