var tempbd=new List<TempBillDetailsView>(); foreach (var eitem in bitem) { tempbd.Add(new TempBillDetailsView { StockId = getorder.StockId, PCS = getorder.PCS }); }