public List <Contract> GetAllContracts() { List <l2g_tbl_Contract> contractEntities = db.l2g_tbl_Contract.ToList(); List <Contract> contracts = new List <Contract>(); foreach (l2g_tbl_Contract contract in contractEntities) { contracts.Add(MappingConfig.ContractToBusinessEntity(contract)); } return(contracts); }