public static IEnumerable <ProductionDto.ProductCategory> GetAll(IDomainAccess ds)
 {
     return(ds.Query <ProductCategory>().MakeCacheable().ToList()
            .Select(x => new ProductionDto.ProductCategory {
         Id = x.ProductCategoryId, Name = x.ProductCategoryName
     }));
 }
            public static int Save(IDomainAccess ds, ProductionDto.Product dto)
            {
                var p = new Product
                {
                    ProductName = dto.ProductName,
                    ProductCategory = ds.Load<ProductCategory>(dto.ProductCategoryId)
                };

                return (int)ds.Save(p);
            }
            public static int Save(IDomainAccess ds, ProductionDto.Product dto)
            {
                var p = new Product
                {
                    ProductName     = dto.ProductName,
                    ProductCategory = ds.Load <ProductCategory>(dto.ProductCategoryId)
                };

                return((int)ds.Save(p));
            }
 public static IEnumerable<ProductionDto.ProductCategory> GetAll(IDomainAccess ds)
 {
     return ds.Query<ProductCategory>().MakeCacheable().ToList()
         .Select(x => new ProductionDto.ProductCategory { Id = x.ProductCategoryId, Name = x.ProductCategoryName }); 
 }