:::: MENU ::::
Posts tagged with: LINQ

ROW_NUMBER() in LINQ 2 SQL

Last week was quite simple and went without trouble  , and just before I start enjoying my weekends – stuck in to in issue of getting ROW_NUMBER() (as we are doing in sandard SQL Query ! Finally come-up with sort and sweet code! var items = context.ItemMasters.AsEnumerable() .Select((u, index) =>  new ItemDetail {    ItemId = […]


Check Model State Errors

Recently faced new error in MVC3 Project related to Model State , While checking “ModelState.IsValid”  it was always return false , I wasn’t sure whats going wrong with my ModelState Finally got small piece of code that worked out fine for me ! Here it is ,  var errors = ModelState .Where(x => x.Value.Errors.Count > […]