Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
I am trying to develop a new Module using DAL 2 and I want to get Max of the ID.
public int getMax(int moduleId)
{
int t;
using (IDataContext db = DataContext.Instance())
{
t = db.ExecuteQuery(CommandType.Text, "select MAX(ItemId) from Itemes");
}
return t;
}
but it didn't work can any one give the correct syntax. please.