コード例 #1
0
ファイル: Categories.cs プロジェクト: dcrider/STARTERUP
        public static CategoryDTO MapEntity(AngularJSAuthentication.EDMX.Categories data)
        {
            if (data == null) return null;

            var result = new CategoryDTO()
            {
                CategoryID = data.CategoryID,
                CategoryName = data.CategoryName,
                IsActive = data.IsActive,
                DateCreated = data.DateCreated,
                Description = data.Description
            };

            return result;
        }
コード例 #2
0
ファイル: Products.cs プロジェクト: dcrider/STARTERUP
        public static ProductDTO MapEntity(AngularJSAuthentication.EDMX.Products data)
        {
            if (data == null) return null;

            var result = new ProductDTO()
            {
                ProductID = data.ProductID,
                ProductName = data.ProductName,
                OnSale = data.OnSale,
                SupplierID = (int)data.SupplierID,
                DateCreated = data.DateCreated,
                AccountID = data.AccountID,
                CategoryID = data.CategoryID,
                IsActive = data.IsActive,
                Price = (decimal)data.Price,
                SalePrice = (decimal)data.SalePrice,
                Description = data.Description

            };

            return result;
        }