コード例 #1
0
        //based on the type fields prensent in the broker, call the right repository method
        public ICollection <BrokerModel> GetInfo(BrokerQueryModel entity)
        {
            if (entity.FirstName != null && entity.LastName != null)
            {
                return(_repository.GetByName(entity.FirstName, entity.LastName));
            }
            else if (entity.Email != null)
            {
                return(_repository.GetByEmail(entity.Email));
            }
            else if (entity.Expertise != null)
            {
                return(_repository.GetByExpertise(entity.Expertise));
            }

            return(new List <BrokerModel>());
        }
コード例 #2
0
 public IEnumerable <BrokerModel> GetInfo(BrokerQueryModel entity)
 {
     return(_service.GetInfo(entity));
 }