Beispiel #1
0
        public string[] AutocompleteSearchProductColor(string term)
        {
            if (term == null)
            {
                return(null);
            }
            List <ProductColor> productColors = _productColorBusinessLogic.GetByStr(term);
            List <string>       array         = new List <string>();

            foreach (var item in productColors)
            {
                array.Add(item.Name);
            }
            return(array.ToArray());
        }
 public int?Resolve(ProductView source, Product destination, int?destMember, ResolutionContext context)
 {
     try {
         var item = _productColorBusinessLogic.GetByStr(source.ProductColorName).FirstOrDefault();
         if (item == null)
         {
             return(null);
         }
         return(item.Id);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }