Пример #1
0
        public static RolePrimitive GetPrimitive(this Role entity)
        {
            RolePrimitive primitive = new RolePrimitive();

                primitive.Id = entity.Id;

                primitive.Name = entity.Name;

                primitive.CreateTime = entity.CreateTime;

                primitive.DeleteTime = entity.DeleteTime;

                return primitive;
        }
Пример #2
0
        public static RolePrimitive GetPrimitiveCopy(this RolePrimitive primitiveToCopy)
        {
            if (primitiveToCopy == null) return null;

                RolePrimitive primitive = new RolePrimitive();

                primitive.Id = primitiveToCopy.Id;

                primitive.Name = primitiveToCopy.Name;

                primitive.CreateTime = primitiveToCopy.CreateTime;

                primitive.DeleteTime = primitiveToCopy.DeleteTime;

                return primitive;
        }