<add name="dbPropertyManagerEntities" connectionString="metadata=res://*/PropSoftModel.csdl|res://*/PropSoftModel.ssdl|res://*/PropSoftModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\dbPropertyManager.mdf;integrated security=True;connect timeout=30;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
using (var context = new dbPropertyManagerEntities()) { var query = from row in context.tbl_Property select row; if (!string.IsNullOrEmpty(searchTerm)) { query = query.Where(row => row.propName.Contains(searchTerm) || row.propAddress.Contains(searchTerm)); } query = query.OrderBy(s => s.propName); var qRowCount = query.Count();//Error is here var qRow = query.Skip(skip).Take(take); rowCount = qRowCount; return qRow.ToList(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)