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); }
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); }