آقای نصیری
لایه سرویس همه این کارها رو انجام میده
شیی Order به متد فوق ارسال میشه سپس OrderProductVarients که به عنوان یک Custome property تعریف شده پشت صحنه یک linq query اجرا میکنه و اگر لازم باشه مکانیزم کش هم انجام میشه توی تصویر هم این شی یک لیست از شی OrderProductVarient نه چیز دیگه ای و یک رکورد داره.
من متوجه نمیشم دیتا سورس من یک Ilist با یک رکورد این چه تناقضی با Lazy loading توکار لایه بیزنس داره
جالب اینجاست با تعریف یک کلاس مدل مشکل حل میشه!
حالا ازین کد استفاده کردم
به نظر من یک جایی از متد StronglyTypedList داره همه propertyهای شی جنریک مپ میکنه!
لایه سرویس همه این کارها رو انجام میده
شیی Order به متد فوق ارسال میشه سپس OrderProductVarients که به عنوان یک Custome property تعریف شده پشت صحنه یک linq query اجرا میکنه و اگر لازم باشه مکانیزم کش هم انجام میشه توی تصویر هم این شی یک لیست از شی OrderProductVarient نه چیز دیگه ای و یک رکورد داره.
من متوجه نمیشم دیتا سورس من یک Ilist با یک رکورد این چه تناقضی با Lazy loading توکار لایه بیزنس داره
جالب اینجاست با تعریف یک کلاس مدل مشکل حل میشه!
public class OrderProductVarientModel { public int OrderProductVarientId { get; set; } }
حالا ازین کد استفاده کردم
.MainTableDataSource(dataSource => { var listOfRows = new List<OrderProductVarientModel>(); for (int i = 0; i < orderProductVariants.Count; i++) { listOfRows.Add(new OrderProductVarientModel { OrderProductVarientId = orderProductVariants[i].OrderProductVariantId }); } dataSource.StronglyTypedList(listOfRows); //dataSource.StronglyTypedList(orderProductVariants); })
به نظر من یک جایی از متد StronglyTypedList داره همه propertyهای شی جنریک مپ میکنه!