System.InvalidOperationException: Invalid attempt to call MetaData when reader is closed.
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlDataReader.CheckMetaDataIsReady()
at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)
at System.Data.ProviderBase.SchemaMapping.LoadDataRow()
at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler)
at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1.Buffer()
at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderSession`1.Buffer()
at System.Data.Linq.SqlClient.SqlConnectionManager.BootUser(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.CompiledQuery.Execute(IProvider provider, Object[] arguments)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.ExecuteKeyQuery(Object[] keyValues)
at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.Execute(Object instance)
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Data.Linq.EntityRef`1.get_Entity()
at ERP.Model.PartyProduct.get_Type()
at CompiledRazorTemplates.Dynamic.beacbfcfbad.Execute()
at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context)
at System.Web.Mvc.HtmlTemplateBase`1.Run(ExecuteContext context)
at CMS.Core.ITemplateExtensions.Run[T](ITemplate template, T Model)
at CMS.Core.ITemplateExtensions.Parse[T](String template, T Model)
@{var books = ERP.Data.DBContext.Current.Product.Active().OrderByDescending(i => i.DateUpdated).ToList();}

Recently Updated Books

Error:
Value cannot be null.
Parameter name: writer
@{ var db = ERP.Data.DBContext.Current; var authors = db.Party.Active().Where(p => p.TypeId == 1017 && db.PartyProduct.Any(i => i.PartyId == p.Id)); var books = ERP.Data.DBContext.Current.Product.Active(); }

A National Archive of Information

@ERP.Data.Service.BusinessService.ByType("Publisher").Count()

Publishers

Featuring complete portfolio & virtual showroom of @ERP.Data.Service.BusinessService.ByType("Publisher").Count() active Publishers in Bangladesh.

@authors.Count().ToString("#,###")

Authors

Portfolio of an ever growing list of legends. About 3,000 Bengali authors & Poets of the past, present & future.

@books.Count().ToString("#,###")

Books

A complete online catalog of Bangla books. From the everlasting classics to modern literature of the future generation.

Error:
Value cannot be null.
Parameter name: writer