Beispiel #1
0
        public async Task <IEnumerable <AspNetUserPinModel> > GetAspNetUserPins()
        {
            _logger.LogInformation((int)LoggingEvents.GET_ITEM, "Get the list of users in AspNetUserPins");
            AspNetUserPinsDbContext          dbContext = new AspNetUserPinsDbContext(_iconfiguration, _logger);
            IEnumerable <AspNetUserPinModel> list      = dbContext.GetAspNetUserPins();

            return(list);
        }
Beispiel #2
0
        public APIGatewayProxyResponse GetUsersSampleAPI()
        {
            AspNetUserPinsDbContext          dbContext = new AspNetUserPinsDbContext(_iconfiguration, _logger);
            IEnumerable <AspNetUserPinModel> list      = dbContext.GetAspNetUserPins();
            var response = new APIGatewayProxyResponse
            {
                StatusCode = (int)HttpStatusCode.OK,
                Body       = JsonConvert.SerializeObject(list),
                Headers    = new Dictionary <string, string> {
                    { "Content-Type", "application/json" }
                }
            };

            return(response);
        }