Example #1
0
        public async Task <bool> RouteToPM(List <Recommendation> recommendation)
        {
            if (recommendation != null)
            {
                foreach (var item in recommendation)
                {
                    _talmateDbContext.Recommendations.Add(item);
                }
                var result = _talmateDbContext.SaveChanges();
                if (result > 0)
                {
                    return(await Task.FromResult(true));
                }
            }

            return(await Task.FromResult(false));
        }
        public async Task <bool> Post(Demand demand)
        {
            if (demand != null)
            {
                _talmateDbContext.Demands.Add(demand);
                var result = _talmateDbContext.SaveChanges();
                if (result > 0)
                {
                    return(await Task.FromResult(true));
                }
            }

            return(await Task.FromResult(false));
        }