public static CD_Language ToEntity(this LanguageContract contract) { if (contract == null) { return(null); } var entity = new CD_Language(); entity.ID = contract.ID; entity.DisplayName = contract.DisplayName; entity.EngName = contract.EngName; entity.NativeName = contract.NativeName; entity.Pair = contract.Pair; entity.DateCreated = contract.DateCreated; entity.DateChanged = contract.DateChanged; entity.DateDeleted = contract.DateDeleted; return(entity); }
public static LanguageContract ToContract(this CD_Language entity) { if (entity == null) { return(null); } var contract = new LanguageContract(); contract.ID = entity.ID; contract.DisplayName = entity.DisplayName; contract.EngName = entity.EngName; contract.NativeName = entity.NativeName; contract.Pair = entity.Pair; contract.DateCreated = entity.DateCreated; contract.DateChanged = entity.DateChanged; contract.DateDeleted = entity.DateDeleted; return(contract); }