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; }
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; }