Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }