how to convert this query in MVC C# "SELECT NamaBulan FROM PARAMETER WHERE Bulan=bulan.1"
i was try like this
if (ModelState.IsValid)
{ var bulan1= DateTime.Now.Month.ToString();
var bulan2= from z in p.NamaBulan where bulan1==p.Bulan
select z;
search.Day = bulan2.ToString();
but still not working If youcan solve this problem please tell me and I will be appreciate it
Thanks
Jignesh TrivediPosted Aug 13, 2015, 12:13 AM
Hi,
Here you are question is not clear. what is your data access and what is your entity name etc.
probably your query becomes
var bulan2 = (From z in entityContext.PARAMETER where z.Bulan="bulan.1"
select new {name = z.NamaBulan }).ToList();
try this
hope this will help you.