public List <ProductDto15> GetListProduct15(int top) { List <ProductDto15> products = new List <ProductDto15>(); for (int i = 0; i < top; i++) { var product = new ProductDto15() { ProductId = i + 1, ProductName = "Iphone " + i, Price = 100 + (i + 1), CreatedDate = DateTime.Now, DateManufactory = DateTime.Now.AddDays(-1), DateExpried = DateTime.Now.AddDays(10), Properties1 = DateTime.Now.Ticks + i, Properties2 = DateTime.Now.Ticks + i, Properties3 = DateTime.Now.Ticks + i, Properties4 = DateTime.Now.Ticks + i, Properties5 = DateTime.Now.Ticks + i, Properties6 = DateTime.Now.Ticks + i, Properties7 = DateTime.Now.Ticks + i, Properties8 = DateTime.Now.Ticks + i, Properties9 = DateTime.Now.Ticks + i, }; products.Add(product); } return(products); }
public ProductModel15(ProductDto15 dto) { ProductId = dto.ProductId; ProductName = dto.ProductName; Price = dto.Price; CreatedDate = dto.CreatedDate; DateManufactory = dto.DateManufactory; DateExpried = dto.DateExpried; Properties1 = dto.Properties1; Properties2 = dto.Properties2; Properties3 = dto.Properties3; Properties4 = dto.Properties4; Properties5 = dto.Properties5; Properties6 = dto.Properties6; Properties7 = dto.Properties7; Properties8 = dto.Properties8; Properties9 = dto.Properties9; }