public static RuleAttributeContract ToContract(this UM_RuleAttribute entity) { if (entity == null) { return(null); } var contract = new RuleAttributeContract(); contract.DateChanged = entity.DateChanged; contract.DateCreated = entity.DateCreated; contract.DateDeleted = entity.DateDeleted; contract.ID = entity.ID; contract.AttributeSchemaNodeID = entity.AttributesSchemaNodeID; return(contract); }
public static UM_RuleAttribute ToEntity(this RuleAttributeContract contract) { if (contract == null) { return(null); } var entity = new UM_RuleAttribute(); entity.DateChanged = contract.DateChanged; entity.DateCreated = contract.DateCreated; entity.DateDeleted = contract.DateDeleted; entity.ID = contract.ID; entity.RuleID = contract.RuleID; entity.AttributesSchemaNodeID = contract.AttributeSchemaNodeID; entity.Value = contract.Value; return(entity); }