Ejemplo n.º 1
0
        public static RecipeComponentPrimitive GetPrimitive(this RecipeComponent entity)
        {
            RecipeComponentPrimitive primitive = new RecipeComponentPrimitive();

                primitive.Id = entity.Id;

                primitive.Material_Id = entity.Material_Id;

                primitive.Recipe_Id = entity.Recipe_Id;

                primitive.Amount = entity.Amount;

                primitive.Deleted = entity.Deleted;

                primitive.Deactivated = entity.Deactivated;

                return primitive;
        }
Ejemplo n.º 2
0
        public static RecipeComponentPrimitive GetPrimitiveCopy(this RecipeComponentPrimitive primitiveToCopy)
        {
            if (primitiveToCopy == null) return null;

                RecipeComponentPrimitive primitive = new RecipeComponentPrimitive();

                primitive.Id = primitiveToCopy.Id;

                primitive.Material_Id = primitiveToCopy.Material_Id;

                primitive.Recipe_Id = primitiveToCopy.Recipe_Id;

                primitive.Amount = primitiveToCopy.Amount;

                primitive.Deleted = primitiveToCopy.Deleted;

                primitive.Deactivated = primitiveToCopy.Deactivated;

                return primitive;
        }