Example #1
0
 public override JsonResult AutoComplete(string name)
 {
     return(Json(_promotionRepository.AutoComplete(name).Where(entity => entity.IsProdBindable.HasValue && entity.IsProdBindable.Value)
                 .Where(entity => string.IsNullOrEmpty(name) ? true : entity.Name.StartsWith(name.Trim()))
                 .Where(e => e.Status != (int)DataStatus.Deleted)
                 .Take(10)
                 , JsonRequestBehavior.AllowGet));
 }