Wednesday, December 18, 2013

Passing null value to Integer in MVC

  int Password_No=0;

                    int chkpwdcnt = context.tbl_PasswordHistory.Where(u => u.USER_ID == userid).Count();
                    if(chkpwdcnt!=0)
{
                    Password_No = context.tbl_PasswordHistory.Where(u => u.USER_ID == userid).Max(u => u.Password_Number);
}

1 comment:

  1. Meet Your Writer Professional SEO Content Writing Services at Writersfort . We are providing content creation, content curation & content marketing services to the clients, agencies, retailers and brands. Place an order in second A Few Words About Us The internet is an electronic behemoth, a vast online resource of information whose exponential growth shows no signs.

    ReplyDelete