public IHttpActionResult GetSellingPoints()
        {
            try
            {
                var items = sellingPointRepository.List();

                var sellingPoints = new List <SellingPoint>();
                foreach (var item in items)
                {
                    sellingPoints.Add(new SellingPoint()
                    {
                        ARTIKELCODE                = item.SellingPointIdentifier.ARTIKELCODE,
                        FACTUURDEBITEURNR          = item.SellingPointIdentifier.FACTUURDEBITEURNR,
                        FACTUURDEBITEURNAAM        = item.FACTUURDEBITEURNAAM,
                        FACTUURDEBITEUR_NAAM_ALIAS = item.FACTUURDEBITEUR_NAAM_ALIAS,
                        FACTUURDEBITEURWEB         = item.FACTUURDEBITEURWEB,
                        FACTUURDEBITEUR_WEB_ALIAS  = item.FACTUURDEBITEUR_WEB_ALIAS,
                        FACTUURDEBITEURLAND        = item.FACTUURDEBITEURLAND,
                    });
                }

                logger.Log(ErrorType.INFO, "GetSellingPoints()", RequestContext.Principal.Identity.Name, "Total in query: " + items.Count(), "api/woood-verkooppunt-view/list", startDate);

                return(Ok(sellingPoints));
            }
            catch (Exception e)
            {
                logger.Log(ErrorType.ERR, "GetSellingPoints()", RequestContext.Principal.Identity.Name, e.Message, "api/woood-verkooppunt-view/list");

                return(InternalServerError(e));
            }
        }
Beispiel #2
0
        public void SellingPointList()
        {
            var rep = new SellingPointRepository();

            var sellingPoints = rep.List();

            sellingPoints.Should().NotBeNull();
        }