{"action":"created","comment":{"url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/comments/152329786","pull_request_review_id":78175215,"id":152329786,"diff_hunk":"@@ -0,0 +1,587 @@\n+---\n+title: .NET Core REST API in About 30 Minutes\n+author: Evan Kaiser\n+tags:\n+  - .NET Core\n+  - REST API\n+  - Programming Guides\n+---\n+\n+## .NET Core\n+\n+This is an ongoing series on .NET Core.\n+\n+1) [Setting up .NET Core](../setting-up-dotnet-core)\n+2) .NET Core REST API in About 30 Minutes\n+\n+***\n+## Introduction\n+\n+Today I'm going to go over how to create a .NET Core 2.0 REST application. The result will be a very basic Model-Controller application with an In-Memory database that allows you to perform a few operations on a simple Airplane entity. It will use the new simplified VS Code IDE and the .NET Core CLI (Commandline Interface) in order to allow you to get a new app up and running in about 30 minutes!\n+\n+If you have not set up your environment yet, please take a look at the previous article in this series, [Setting up .NET Core](../setting-up-dotnet-core).\n+\n+***\n+## Setup\n+\n+### VS Code and Directories\n+\n+Now that you have the tools, it's time to set up your new project. First, open VS Code and press ```Ctrl+` ``` to open the built-in terminal. On Linux/MacOS, you'll find that it says \"bash\" or whatever your default scripting shell is in the top-right window selector. In Windows 10 it will say \"powershell\".\n+\n+**NOTE**: for the purposes of this tutorial, when discussing commands/paths, I'll be using Windows 10 as the default OS.\n+\n+Using the terminal navigate to where you want to put this sample project. I like to use `%USERPROFILE%\\Source\\Repos`, because this is where Visual Studio defaults git repositories. To create this directory, use the following commands:\n+\n+```\n+cd $env:UserProfile\n+mkdir Source\\Repos\n+```\n+\n+Whether it was already there or newly created, navigate to the `Repos` directory and create a new directory for this project:\n+\n+```\n+cd $env:UserProfile\\Source\\Repos\n+mkdir AirDemo\n+```\n+\n+Now, in VS Code, click on the folders icon (top-left icon in left sidebar). Click the `Open Folder` button and select the new `AirDemo` folder. You will now notice that when you open the terminal, you will be automatically placed in that folder.\n+\n+***\n+### Create Your First Project\n+\n+To create a new .NET Core project, we'll use the CLI, which stands for \"Command Line Interface\". First, let's create a project for the [Domain Model](https://en.wikipedia.org/wiki/Domain_model).\n+\n+```\n+dotnet new classlib -n AirDemo.Domain\n+```\n+\n+***\n+:bulb:\n+\n+You may notice that the first time you have C# code in the project and/or you open a C# file, it will ask you to install the C# VS Code extension. You will definitely want to do this. If it did not ask you to, you can install it through the command line:\n+\n+```\n+code --install-extension ms-vscode.csharp\n+```\n+***\n+\n+You'll note the new project in your Explorer window has appeared with the `.csproj` and a file called `Class1.cs`. Examine these two files. `Class1.cs` is your typical C# class that gets created in Visual Studio when you add a new project. However, note that the `.csproj` is greatly simplified compared to the project files created by VS2015 and earlier. This is a vast improvement that reflects how .NET Core focuses primarily on code above configuration allowing for better streamlined, modular, and testable code.\n+\n+Also, note that the setting `TargetFramework` is set to `netstandard2.0`. This is to allow any framework that supports the .NET Standard library to use your library. You can find the list of supported frameworks [here](https://docs.microsoft.com/en-us/dotnet/standard/net-standard).\n+\n+Since, for the purposes of this tutorial, I've decided to use Entity Framework Core as my ORM, we will need a reference to the library. You can use the CLI to add nuget packages, like so:\n+\n+```\n+dotnet add .\\AirDemo.Domain\\ package Microsoft.EntityFrameworkCore\n+```\n+\n+Take a look at the `.csproj` and note that it included your nuget package reference directly in this file. This is another change from VS2015 and earlier versions that included a package.json containing this info. This nicer, consolidated approach comes with the added benefit that packages will be carried along when projects that reference them are referenced by other ones. For example, when we ultimately create the Web API endpoint project in this tutorial, we will not need to explicitly add EF Core since we will already have a reference to the Domain project.\n+\n+***\n+## Start Coding!\n+\n+Now we have to start building up our Domain Model. For this tutorial, I've chosen to use an Airplane as our first entity, because it is a good example of a real-world thing that can contain various properties and behaviors, like the following:\n+\n+* string ModelNumber, i.e. \"Boeing 747\"\n+* string SerialNumber, i.e. \"123456789\"\n+* string CurrentAirportCode, i.e. \"BWI\"\n+* int SeatCount\n+* decimal WeightInKilos\n+* DateTimeOffset? LastTakeoffTime\n+* DateTimeOffset? EstimatedLandingTime\n+* Fly(TimeSpan estimatedTripTime);\n+* Land(string airportCode);\n+\n+Let's start off by creating our Airplane. We'll worry about how we're going to persist it to the database later. Add a new file to the Domain project that looks like this:\n+\n+**`Airplane.cs`**\n+```c#\n+using System;\n+\n+namespace AirDemo.Domain\n+{\n+    public class Airplane\n+    {\n+        public virtual Guid AirplaneId { get; private set; }\n+        \n+        public virtual string ModelNumber { get; set; }\n+        \n+        public virtual string SerialNumber { get; set; }\n+        \n+        public virtual string CurrentAirportCode { get; private set; }\n+        \n+        public virtual int SeatCount { get; set; }\n+        \n+        public virtual decimal WeightInKilos { get; set; }\n+        \n+        public virtual DateTimeOffset? LastTakeoffTime { get; private set; }\n+        \n+        public virtual DateTimeOffset? EstimatedLandingTime { get; private set; }\n+\n+        public virtual void Fly(TimeSpan estimatedTripTime)\n+        {\n+            this.CurrentAirportCode = null;\n+            this.LastTakeoffTime = DateTimeOffset.Now;\n+            this.EstimatedLandingTime = DateTimeOffset.Now.Add(estimatedTripTime);\n+        }\n+\n+        public virtual void Land(string airportCode)\n+        {\n+            this.CurrentAirportCode = airportCode;\n+            this.LastTakeoffTime = null;\n+            this.EstimatedLandingTime = null;\n+        }\n+    }\n+}\n+```\n+\n+The properties that are determined by behavior (i.e. flying and landing) are set as private so that the entity itself maintains its state based on behavior. This is a way to use Code First entities to our advantage to build Object-Oriented applications.\n+\n+One more thing we might want to do is decide which properties are immutable. Since certain fields never change on an airplane, i.e. Model Number, Serial Number, Weight, and Seat Count, there is no particular reason why we should allow those attributes to be set externally. Instead, we can have them be passed in on the constructor so that a calling service must set them when creating the entity. We can then make the empty constructor private to avoid creating it without the appropriate data (EF will use reflection magic to create the entity to look like what is in the record so it does not need a public empty constructor).\n+\n+***\n+:bulb:\n+\n+Setting your properties and methods to `virtual` makes it easy to mock/override things in the future. However it is not strictly necessary. If you want to have better control of what a subclass can do with the properties, you may wish to eschew or be more selective with your use of this keyword.\n+***\n+\n+Modify the rest of the properties to be private and add a constructor like so:\n+\n+**`Airplane.cs`**\n+```c#\n+using System;\n+\n+namespace AirDemo.Domain\n+{\n+    public class Airplane\n+    {\n+        private Airplane()\n+        {\n+        }\n+\n+        public Airplane(string modelNumber, string serialNumber, int seatCount, decimal weightInKilos)\n+        {\n+            this.AirplaneId = Guid.NewGuid();\n+            this.ModelNumber = modelNumber;\n+            this.SerialNumber = serialNumber;\n+            this.SeatCount = seatCount;\n+            this.WeightInKilos = weightInKilos;\n+        }\n+\n+        public virtual Guid AirplaneId { get; private set; }\n+        \n+        public virtual string ModelNumber { get; private set; }\n+        \n+        public virtual string SerialNumber { get; private set; }\n+        \n+        public virtual string CurrentAirportCode { get; private set; }\n+        \n+        public virtual int SeatCount { get; private set; }\n+        \n+        public virtual decimal WeightInKilos { get; private set; }\n+        \n+        public virtual DateTimeOffset? LastTakeoffTime { get; private set; }\n+        \n+        public virtual DateTimeOffset? EstimatedLandingTime { get; private set; }\n+\n+        public virtual void Fly(TimeSpan estimatedTripTime)\n+        {\n+            this.CurrentAirportCode = null;\n+            this.LastTakeoffTime = DateTimeOffset.Now;\n+            this.EstimatedLandingTime = DateTimeOffset.Now.Add(estimatedTripTime);\n+        }\n+\n+        public virtual void Land(string airportCode)\n+        {\n+            this.CurrentAirportCode = airportCode;\n+            this.LastTakeoffTime = null;\n+            this.EstimatedLandingTime = null;\n+        }\n+    }\n+}\n+```\n+\n+We now have an almost immutable entity that is only modified by two particular methods, such that the entity is in control of the state of all its own properties.\n+\n+***\n+### Persisting the Airplane\n+\n+It's great to be able to create an entity in memory, but we need to be able to persist our entity to a database. For now, we're going to use a mock In-Memory database provided by EF Core, such that we don't need to get into Migrations or creating the actual DB yet.\n+\n+In order to persist and read entities, we need to create a Database Context, which allows us to take in-memory entities and write them to the DB, or query the set of entities in a certain \"set\" (i.e. Table).\n+\n+The Context is very easy to create, it is simply a class that inherits from DbContext and contains a public property representing the set of entities.\n+\n+**`AirplaneContext.cs`**\n+```c#\n+using Microsoft.EntityFrameworkCore;\n+\n+namespace AirDemo.Domain\n+{\n+    public class AirplaneContext : DbContext\n+    {\n+        public AirplaneContext(DbContextOptions options) : base(options)\n+        {\n+        }\n+\n+        public virtual DbSet<Airplane> Airplanes { get; private set; }\n+    }\n+}\n+```\n+\n+All we had to do was inherit from DbContext, supply the constructor that accepts options, and then create a property that returns a `DbSet` typed to the entity you wish to return. By default, EF expects the property to be the pluralization of the entity (which is also what the table name generated by Migrations would be called). Note that just like with the entity properties, the `DbSet` may also have a private setter, which essentially means only EF is responsible for setting it.\n+\n+Our Domain is now ready to perform [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations on the Airplane!\n+\n+***\n+## Create the API Project\n+\n+In order to interact with our Domain, we have to provide our REST API layer to perform the HTTP calls with a JSON data type. Create another project that will contain our API endpoints (and reference the Domain), using the following commands.\n+\n+```\n+dotnet new webapi -n AirDemo.Api\n+dotnet add .\\AirDemo.Api\\ reference .\\AirDemo.Domain\\AirDemo.Domain.csproj\n+```\n+\n+Let's take a look at a few files before moving on to coding...\n+\n+***\n+### AirDemo.Api.csproj\n+\n+Notice how this project file is a little more involved than the Domain one. One thing it does have in common is that it also has a `TargetFramework`, however it is set to `netcoreapp2.0` instead of `netstandard2.0` like the Domain project was. This is due to the fact that this is not a standard library, but the actual app itself. We need to create it as a true .NET Core API in order to have the tooling run it.\n+\n+A few other items to take note of:\n+* `<Folder Include=\"wwwroot\\\" />` - This is used for projects where you are intending to serve MVC Razor or static files and could be ignored/removed for a pure WebAPI.\n+* `<PackageReference Include=\"Microsoft.AspNetCore.All\" Version=\"2.0.0\" />` - A reference to the Nuget package for ASP .NET was automatically added so that we could reference the ASP .NET libraries and so it could configure the Program/Startup. In 2.0 they introduced a nice new `.All` package that includes all the different ways to host .NET Core. This could theoretically be streamlined by including only the packages needed (such as: Kestrel, Http.Sys, etc), but for now, we'll just leave it to make life easier.\n+* `<DotNetCliToolReference Include=\"Microsoft.VisualStudio.Web.CodeGeneration.Tools\" Version=\"2.0.0\" />` - This adds a tooling reference for Visual Studio 2017 Code Generation, which we won't take advantage of currently since we're using VS Code. Eventually, we will want to add a similar tooling entry for Entity Framework Migrations.\n+\n+***\n+### Program.cs\n+\n+The entry point for all .NET Core apps has been standardized to the `Program::Main` method, which is nice, because it allows customization of the web host down to the nitty gritty level, if necessary. The code in this method will build the default web host and run it as a service. In Development, it will run using the [Kestrel web server](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?tabs=aspnetcore2x) on port 5000.\n+\n+Try running the app for the first time, using the following command (you can also `cd` into the API directory and simply type `dotnet run`):\n+```\n+dotnet run --project .\\AirDemo.Api\n+```\n+\n+You'll notice the text in the console indicating that your app is running and listening on `Http://localhost:5000`. If this is truly the first time you've run a .NET Core application, you'll probably also notice that it says: `Hosting environment: Production`.\n+\n+We definitely don't want to be running using `Production` settings, so let's fix that. Temporarily set the `ASPNETCORE_ENVIRONMENT` variable, like so:\n+```\n+$env:ASPNETCORE_ENVIRONMENT=\"Development\"\n+```\n+\n+***\n+:bulb:\n+\n+You should also change this in your Environment Variable settings so that you don't have to remember to change it every time. In Windows 10, search for \"Environment Variables\" and click \"Edit environment variables for your account\". Then under \"User variables\", click \"New...\" and add a new entry with the `Name=ASPNETCORE_ENVIRONMENT` and the `Value=Development`.\n+***\n+\n+### Startup.cs\n+\n+Here is where all the application configuration magic happens.\n+\n+The startup constructor injects the configuration automatically. We'll see in a moment where the configuration can be set up, but just remember that this is where it comes in. You may also optionally inject some other things that are already setup in the IoC container, such as `IHostingEnvironment`, then save it to another public property on the class to be used later (for example, in `ConfigureServices`).\n+\n+The IoC Container can be setup using the `ConfigureServices` method. We'll see in a bit how we have to use this to configure the DB context so that it can be injected into our app.\n+\n+The `Configure` method is responsible for setting up the application [Middleware](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware?tabs=aspnetcore2x). You can use built-in middleware (such as CORS provided by the `Microsoft.AspNetCore.Cors` and `Micrsofot.AspNetCore.All` nuget packages), and you may also write your own custom middleware, which I will address in a later post.\n+\n+***\n+### appsettings.json and appsettings.Development.json\n+\n+This explains why we set our ASPNETCORE_ENVIRONMENT to Development. The `appsettings.json` is the base configuration file that the app will read from for all environments. The other file, `appsettings.Development.json`, will be merged in when the environment variable is set to Development. Similarly, when on a server where that environment variable is \"Test\", it would merge the `appsettings.json` and `appsettings.Test.json` files.\n+\n+Note that the merge will give precedent to the environment-specific file. Therefore if a key exists in both places, the environment file will win. It will also allow you to partially replace certain keys within configuration sections (which are objects within the JSON). For example, taking into account the following two files:\n+\n+**`appsettings.json`**\n+```json\n+{\n+    \"Service\": {\n+        \"ApiKey\": \"123456\",\n+        \"Timeout\": 10\n+    }\n+}\n+```\n+\n+**`appsettings.Production.json`**\n+```json\n+{\n+    \"Service\": {\n+        \"ApiKey\": \"999999\"\n+    }\n+}\n+```\n+\n+The resulting configuration would be:\n+```json\n+{\n+    \"Service\": {\n+        \"ApiKey\": \"999999\",\n+        \"Timeout\": 10\n+    }\n+}\n+```\n+\n+In other words, it does not \"overwrite\" the Service section, it will merge it and only overwrite the keys specified explicitly.\n+\n+***\n+## Controllers\n+\n+Controllers are the entry point for the app defining all the API routes to perform queries and transactional requests. Let's look at the Controller that they have provided as an example, `ValuesController.cs`. Open this file and note a few things about it:\n+\n+1) The `[Route(\"api/[controller]\")]` attribute on the class defines how the route from the root of this API should look. The `[controller]` placeholder in the route is substituted with the name of the class without the word \"Controller\" (not case sensitive). Therefore, the route to this controller would be `/api/values`.\n+\n+2) The 5 standard API methods on a particular controller, are provided: GET (all), GET (by ID), POST (i.e. create), PUT (i.e. update), and DELETE.\n+\n+3) Note how the methods take in plain POCO/simple types and return the same. Although this still allows for passing `json` back and forth by default, it is sometimes good to return `IActionResult` instead, in order to provide certain codes, for example 404 if not found in the `GET(int id)` or 201 to indicate \"Created\" for the `POST`.\n+\n+4) Attributes for the method, i.e. `HttpGet` optionally take a route parameter. This is appended to the controller route to form the full route. For example, when specifying `{id}`, the full route would be `/api/values/{id}` where `{id}` is the ID of the record to work with.\n+\n+***\n+### Airplane Controller\n+\n+Let's use this as an example to start creating our Airplane API.\n+\n+First we need to create the controller. While we're at it, let's also inject the `AirplaneContext`, since we know we're going to need to interact with the Domain.\n+\n+**`AirplanesController.cs`**\n+```c#\n+using AirDemo.Domain;\n+using Microsoft.AspNetCore.Mvc;\n+\n+namespace AirDemo.Api.Controllers\n+{\n+    [Route(\"api/[controller]\")]\n+    public class AirplanesController : Controller\n+    {\n+        private readonly AirplaneContext _context;\n+\n+        public AirplanesController(AirplaneContext context)\n+        {\n+            _context = context;\n+        }\n+    }\n+}\n+```\n+\n+Now we need at least one method to call. For now, let's just add the `GET` with no parameters to get all records. Since we have no way of creating these records yet, it will simply return an empty array, but will at least allow us to try out what we have so far. Add the following method to `AirplanesController.cs`:\n+\n+```c#\n+// GET api/airplanes\n+[HttpGet]\n+public IEnumerable<Airplane> Get()\n+{\n+    return _context.Airplanes;\n+}\n+```\n+\n+Let's try running the app and getting the results. Call `dotnet run` and just navigate to `http://localhost:5000/api/airplanes`.\n+\n+Uh oh, you got an error: `InvalidOperationException: Unable to resolve service for type 'AirDemo.Domain.AirplaneContext' while attempting to activate 'AirDemo.Api.Controllers.AirplanesController'.`\n+\n+Well, that was to be expected. Since we're attempting to inject the `AirplaneContext`, it needs to be part of the IoC Container, but we haven't set that up yet. Let's do that now.\n+\n+***\n+### Add the Context to the IoC\n+\n+As mentioned before, the `ConfigureServices` method in `Startup.cs` is where you add to the container. .NET Core has a few methods built in for adding to the IoC container. It is important to understand the distinctions of each:\n+\n+* `services.AddTransient`\n+  * Registers the service as transient, meaning that any time it is resolved (i.e. when it is being injected into the constructor of a class), the IoC will instantiate a new instance of the service. Therefore, if you have 2 different classes using this service, they will have 2 different instances with their own versions of the properties.\n+* `services.AddScoped`\n+  * Registers the service for the life of an API request. So the first time the service is resolved after a request begins, it will create the instance, but any other time it is resolved after that until the request ends it will use that same instance.\n+* `services.AddSingleton`\n+  * Registers the service as a Singleton, i.e. when the app starts, the first time it is resolved it will create the instance and use that same instance for the life of the application process, meaning it will be shared by all requests.\n+* `services.AddDbContext`\n+  * This is a special method that registers the DB Context. It will use the Scoped lifetime, i.e. the same as if you called `AddScoped`. However, the point of this method is to provide additional configuration options for the context.\n+\n+Now, knowing that, you've probably guessed we will be using `AddDbContext`. Add the following line above `services.AddMvc()` (it is typically best practice to leave `services.AddMvc()` and `app.UseMvc()` at the bottom of their respective methods).\n+\n+```c#\n+services.AddDbContext<AirplaneContext>(opt => opt.UseInMemoryDatabase(\"AirDemo\"));\n+```\n+\n+***\n+:bulb:\n+\n+When you have a missing namespace reference in your code, you can click on the item (i.e. AirplaneContext in the previous line) and press Ctrl+. in VS Code to provide a list of options. In the above example, this should allow you to select: `using AirDemo.Domain;`.\n+***\n+\n+You will have an unresolved reference to `UseInMemoryDatabase`. This is because even though AirDemo.Domain comes with EF (and thus the extension method `AddDbContext`), it does not contain every OLE DB Provider in that library. Therefore, to connect to a provider (i.e. In Memory, SQL Server, SQLite, etc), we need to indicate to the API how to do so. Since, for this demonstration, we're using In Memory, make sure your terminal is in the API project directory and call the following:\n+\n+```\n+dotnet add package Microsoft.EntityFrameworkCore.InMemory\n+```\n+\n+Now, using VS Code's missing reference suggestions, you should see an option for `using Microsoft.EntityFrameworkCore`. If you don't see this suggestion, try using `dotnet restore` and/or restarting VS Code. Sometimes it is slow to pick up the new package added and requires a restart.\n+\n+Now try running the project and navigating to `http://localhost:5000/api/airplanes`. The error should be gone, and you should receive an empty array response, i.e. `[]`.\n+\n+***\n+### More API Methods\n+\n+Now that we have it running and know that it will work, let's try adding the remaining API methods!\n+\n+* GET (all) Revisited\n+\n+  First, let's change the existing `GET` to an async method. The `async/await` pattern allows us to offload DB access and other possibly long-running methods to free up the ASP worker process. Obviously this will not be the case with this simple app, but it doesn't hurt to get used to always using `async/await`!\n+\n+ ```c#\n+  // GET api/airplanes\n+  [HttpGet]\n+  public async Task<IEnumerable<Airplane>> Get()\n+  {\n+      return await _context.Airplanes.ToAsyncEnumerable().ToList();\n+  }\n+  ```\n+\n+  Let's go over the changes that make this work:\n+  * `async`: Marks the method as asynchronous to offload it to a separate thread that is not the ASP worker process.\n+  * `await`: Tells the thread to wait on the other async method being called (specifically, `IAsyncEnumerable::ToList()`). Without this, the method would do nothing immediately and then go off to perform the query afterward.\n+  * `ToAsyncEnumerable()`: Modifies the DB call to tell it to perform the query asynchronously. Returns the `IAsyncEnumerable`, which is an EF Core construct that causes any method that materializes the results to be asynchronous.\n+  * `Task<IEnumerable<Airplane>>`: Returns a Task allowing the calling method (the guts of ASP .NET Core, in this case) to await the results.\n+\n+***\n+* POST\n+\n+  Now, before we can do much more, we need to be able to create a record. Add the following to your class:\n+\n+  ```c#\n+  // POST api/airplanes\n+  [HttpPost]\n+  public async Task Post([FromBody]Airplane request)\n+  {\n+      _context.Add(request);\n+      await _context.SaveChangesAsync();\n+  }\n+  ```\n+\n+  This method will take the `json` representing an Airplane entity from the body of the request, add it to the context, and then save the changes of the added entity to the context, thus adding it to the In-Memory database. Try it out, by opening Postman, and doing the following:\n+  * Open a new request by clicking the + icon if you already have a tab open, or simply use the existing tab\n+  * Use the dropdown where it says \"GET\" and change it to \"POST\".\n+  * To the right of the dropdown, enter the URL: `http://localhost:5000/api/airplanes`\n+  * Below that, click `Body`, select `raw`, and then click where it says `Text` and instead select `JSON (application/json)`\n+  * In the text area for the request body, enter the following:\n+  ```json\n+  {\n+      \"ModelNumber\": \"AZ-999\",\n+      \"SerialNumber\": \"12345\",\n+      \"CurrentAirportCode\": \"BWI\",\n+      \"SeatCount\": 232,\n+      \"WeightInKilos\": 1234567\n+  }\n+  ```\n+  * Click \"Send\"\n+\n+  Above the bottom panel, to the far right, you should see: `Status: 200 OK`, along with the request time. If you do not see 200, there was an error. Check the console log to see if you can fix the error. If it was added correctly, you should be able to open up a new Postman tab, leave it as a `GET`, and enter the URL: `http://localhost:5000/api/airplanes` to see the results containing the Airplane you just added.\n+\n+  ***\n+  :question:\n+\n+  You'll probably be thinking, \"Didn't we specifically make the empty constructor and all the properties of Airplane private, so calling code would have to use the constructor? How did we create it without doing that?\". Well yes, normally we wouldn't be asking for an actual EF entity in the request, or returning it back to the client. Usually we would use Request/Response \"ViewModels\" for the API endpoint layer. \n+  \n+  However, for the sake of simplicity in the initial setup, we'll just use the entity. The .NET Core default JSON serializer allows private properties, so it will work for now. In future posts I will go over using a Service layer, containing \"ViewModels\", to prevent the client from being able to control the entity's state.\n+  ***\n+\n+***\n+* GET (one)\n+\n+  Lets now see how the ability to get a single record is written. It is pretty straightforward.\n+\n+  ```c#\n+  // GET api/airplanes/12345\n+  [HttpGet(\"{sn}\")]\n+  public async Task<Airplane> Get(string sn)\n+  {\n+      return await _context.Airplanes.Where(x => x.SerialNumber == sn).ToAsyncEnumerable().FirstOrDefault();\n+  }\n+  ```\n+\n+  Now, restart the app, perform the `POST` again (since the In-Memory database is wiped on the restart), and then use Postman to get: `http://localhost:5000/api/airplanes/12345`.\n+\n+  Notice that instead of using the record's primary key (i.e. `AirplaneId`), we used the `SerialNumber` (passed in as `sn`) to identify the record to get. This is to avoid having to put the ugly 36-character GUID in the URL. This approach uses a unique property that is human readable to provide more user-friendly URLs. For example, if referencing a User, you might use their UserId. \n+  \n+  For other cases, i.e. a blog post, you might need to generate a \"slug\" of the title. [Slugification](https://you.tools/slugify/) is the process of taking something that won't be friendly to a URL, i.e. \"The Best Blog Post: Revisited\" and turn it into something that is, i.e. \"the-best-blog-post-revisited\". We will go over how to generate a Slug in a later post.\n+\n+***\n+* PUT\n+\n+  Now let's consider the `PUT` HTTP method. In a purely CRUD application, the PUT method simply updates every single property with what the client passed up. Sometimes this is fine. In the case of our application, however, we only have 2 ways that we want to modify the entity. It is not possible to retrieve it from the context, update all the properties, and save it. Therefore, we're going to have 2 different PUT methods called `Fly` and `Land`.\n+\n+  ```c#\n+  // PUT api/airplanes/12345/fly\n+  [HttpPut(\"{sn}/fly\")]\n+  public async Task Fly(string sn, [FromBody]TimeSpan estimatedTripTime)\n+  {\n+      var airplane = _context.Airplanes.Where(x => x.SerialNumber == sn).FirstOrDefault();\n+      if (airplane != null)\n+      {\n+          airplane.Fly(estimatedTripTime);\n+      }\n+\n+      await _context.SaveChangesAsync();\n+  }\n+\n+  // PUT api/airplanes/12345/land\n+  [HttpPut(\"{sn}/land\")]\n+  public async Task Land(string sn, [FromBody]string airportCode)\n+  {\n+      var airplane = _context.Airplanes.Where(x => x.SerialNumber == sn).FirstOrDefault();\n+      if (airplane != null)\n+      {\n+          airplane.Land(airportCode);\n+      }\n+\n+      await _context.SaveChangesAsync();\n+  }\n+  ```\n+\n+  Let's try it out.\n+  1) Restart the app and perform the `POST` again\n+  2) Use Postman to make a `PUT` call to `http://localhost:5000/api/airplanes/12345/fly` with the request body simply containing the `json`: `\"00:30:00\"`.\n+  3) Now, if you do a `GET`, you should see that the `lastTakeoffTime` is set to the time you made the request and the `estimatedLandingTime` is set to 30 minutes later.\n+  4) Use Postman to make a `PUT` call to `http://localhost:5000/api/airplanes/12345/land` with the request body simply containing the `json`: `\"JFK\"`.\n+  5) Now, the times should both be `null` and the `currentAirportCode` is set to JFK! This demonstrates the advantages of using an Object Oriented approach. We've allowed the client to only care about one piece of data for each `PUT` request, but have modified up to 3 different properties correctly, rather than relying on the client to do that work!\n+\n+***\n+* DELETE\n+\n+  Finally, the `DELETE` method is pretty straightforward:\n+\n+  ```c#\n+  // DELETE api/airplanes/12345\n+  [HttpDelete(\"{sn}\")]\n+  public async Task Delete(string sn)\n+  {\n+      var airplane = _context.Airplanes.Where(x => x.SerialNumber == sn).FirstOrDefault();\n+      if (airplane != null)\n+      {\n+          _context.Airplanes.Remove(airplane);\n+      }\n+\n+      await _context.SaveChangesAsync();\n+  }\n+  ```\n+\n+  Try it out by restarting the app, performing the `POST` (so you have something to delete), then have Postman hit the `DELETE` method of the URL: `http://localhost:5000/api/airplanes/12345`. Now if you perform a `GET` for that record, you should receive a `204 - No Content`.\n+\n+  ***\n+  :thought_balloon:\n+\n+  Based on [good REST patterns](https://restpatterns.mindtouch.us/HTTP_Status_Codes), `204 - No Content` is really not want we want to see for the `GET` of a missing record. We really want to see `404 - Not Found`, but we'll have to modify it to return an `IActionResult`, which we will go over in a later post.\n+  ***","path":"_posts/2017-11-21-dotnet-core-rest-api-in-about-30-minutes.md","position":574,"original_position":574,"commit_id":"d322641cf151087af88dcfc2b0d35148ab9e6423","original_commit_id":"d322641cf151087af88dcfc2b0d35148ab9e6423","user":{"login":"m1evankaiser","id":33520434,"avatar_url":"https://avatars2.githubusercontent.com/u/33520434?v=4","gravatar_id":"","url":"https://api.github.com/users/m1evankaiser","html_url":"https://github.com/m1evankaiser","followers_url":"https://api.github.com/users/m1evankaiser/followers","following_url":"https://api.github.com/users/m1evankaiser/following{/other_user}","gists_url":"https://api.github.com/users/m1evankaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/m1evankaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1evankaiser/subscriptions","organizations_url":"https://api.github.com/users/m1evankaiser/orgs","repos_url":"https://api.github.com/users/m1evankaiser/repos","events_url":"https://api.github.com/users/m1evankaiser/events{/privacy}","received_events_url":"https://api.github.com/users/m1evankaiser/received_events","type":"User","site_admin":false},"body":"Wow, I wonder why it's formatting the markdown so much differently than both VS Code Preview and TFS Preview... I'll have to just go through again and fix all these little formatting issues.","created_at":"2017-11-21T16:30:56Z","updated_at":"2017-11-21T16:30:56Z","html_url":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4#discussion_r152329786","pull_request_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/comments/152329786"},"html":{"href":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4#discussion_r152329786"},"pull_request":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4"}},"in_reply_to_id":152328123},"pull_request":{"url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4","id":153915658,"html_url":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4","diff_url":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4.diff","patch_url":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4.patch","issue_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/4","number":4,"state":"open","locked":false,"title":"Added my new posts for .NET Core development.","user":{"login":"m1evankaiser","id":33520434,"avatar_url":"https://avatars2.githubusercontent.com/u/33520434?v=4","gravatar_id":"","url":"https://api.github.com/users/m1evankaiser","html_url":"https://github.com/m1evankaiser","followers_url":"https://api.github.com/users/m1evankaiser/followers","following_url":"https://api.github.com/users/m1evankaiser/following{/other_user}","gists_url":"https://api.github.com/users/m1evankaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/m1evankaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1evankaiser/subscriptions","organizations_url":"https://api.github.com/users/m1evankaiser/orgs","repos_url":"https://api.github.com/users/m1evankaiser/repos","events_url":"https://api.github.com/users/m1evankaiser/events{/privacy}","received_events_url":"https://api.github.com/users/m1evankaiser/received_events","type":"User","site_admin":false},"body":"- Added post for setting up .NET Core on your environment\r\n- Added post for creating a basic .NET Core REST API","created_at":"2017-11-21T15:08:01Z","updated_at":"2017-11-21T16:30:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74cb234340bce0125a588433b136b362610f1f33","assignee":{"login":"m1evankaiser","id":33520434,"avatar_url":"https://avatars2.githubusercontent.com/u/33520434?v=4","gravatar_id":"","url":"https://api.github.com/users/m1evankaiser","html_url":"https://github.com/m1evankaiser","followers_url":"https://api.github.com/users/m1evankaiser/followers","following_url":"https://api.github.com/users/m1evankaiser/following{/other_user}","gists_url":"https://api.github.com/users/m1evankaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/m1evankaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1evankaiser/subscriptions","organizations_url":"https://api.github.com/users/m1evankaiser/orgs","repos_url":"https://api.github.com/users/m1evankaiser/repos","events_url":"https://api.github.com/users/m1evankaiser/events{/privacy}","received_events_url":"https://api.github.com/users/m1evankaiser/received_events","type":"User","site_admin":false},"assignees":[{"login":"m1evankaiser","id":33520434,"avatar_url":"https://avatars2.githubusercontent.com/u/33520434?v=4","gravatar_id":"","url":"https://api.github.com/users/m1evankaiser","html_url":"https://github.com/m1evankaiser","followers_url":"https://api.github.com/users/m1evankaiser/followers","following_url":"https://api.github.com/users/m1evankaiser/following{/other_user}","gists_url":"https://api.github.com/users/m1evankaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/m1evankaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1evankaiser/subscriptions","organizations_url":"https://api.github.com/users/m1evankaiser/orgs","repos_url":"https://api.github.com/users/m1evankaiser/repos","events_url":"https://api.github.com/users/m1evankaiser/events{/privacy}","received_events_url":"https://api.github.com/users/m1evankaiser/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"m1anitamcallister","id":33660217,"avatar_url":"https://avatars0.githubusercontent.com/u/33660217?v=4","gravatar_id":"","url":"https://api.github.com/users/m1anitamcallister","html_url":"https://github.com/m1anitamcallister","followers_url":"https://api.github.com/users/m1anitamcallister/followers","following_url":"https://api.github.com/users/m1anitamcallister/following{/other_user}","gists_url":"https://api.github.com/users/m1anitamcallister/gists{/gist_id}","starred_url":"https://api.github.com/users/m1anitamcallister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1anitamcallister/subscriptions","organizations_url":"https://api.github.com/users/m1anitamcallister/orgs","repos_url":"https://api.github.com/users/m1anitamcallister/repos","events_url":"https://api.github.com/users/m1anitamcallister/events{/privacy}","received_events_url":"https://api.github.com/users/m1anitamcallister/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/4/comments","statuses_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/statuses/d322641cf151087af88dcfc2b0d35148ab9e6423","head":{"label":"Members1stFCU:posts/m1evankaiser","ref":"posts/m1evankaiser","sha":"d322641cf151087af88dcfc2b0d35148ab9e6423","user":{"login":"Members1stFCU","id":10208409,"avatar_url":"https://avatars1.githubusercontent.com/u/10208409?v=4","gravatar_id":"","url":"https://api.github.com/users/Members1stFCU","html_url":"https://github.com/Members1stFCU","followers_url":"https://api.github.com/users/Members1stFCU/followers","following_url":"https://api.github.com/users/Members1stFCU/following{/other_user}","gists_url":"https://api.github.com/users/Members1stFCU/gists{/gist_id}","starred_url":"https://api.github.com/users/Members1stFCU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Members1stFCU/subscriptions","organizations_url":"https://api.github.com/users/Members1stFCU/orgs","repos_url":"https://api.github.com/users/Members1stFCU/repos","events_url":"https://api.github.com/users/Members1stFCU/events{/privacy}","received_events_url":"https://api.github.com/users/Members1stFCU/received_events","type":"Organization","site_admin":false},"repo":{"id":104389503,"name":"Members1stFCU.github.io","full_name":"Members1stFCU/Members1stFCU.github.io","owner":{"login":"Members1stFCU","id":10208409,"avatar_url":"https://avatars1.githubusercontent.com/u/10208409?v=4","gravatar_id":"","url":"https://api.github.com/users/Members1stFCU","html_url":"https://github.com/Members1stFCU","followers_url":"https://api.github.com/users/Members1stFCU/followers","following_url":"https://api.github.com/users/Members1stFCU/following{/other_user}","gists_url":"https://api.github.com/users/Members1stFCU/gists{/gist_id}","starred_url":"https://api.github.com/users/Members1stFCU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Members1stFCU/subscriptions","organizations_url":"https://api.github.com/users/Members1stFCU/orgs","repos_url":"https://api.github.com/users/Members1stFCU/repos","events_url":"https://api.github.com/users/Members1stFCU/events{/privacy}","received_events_url":"https://api.github.com/users/Members1stFCU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Members1stFCU/Members1stFCU.github.io","description":"Members1stFCU.github.io","fork":false,"url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io","forks_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/forks","keys_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/teams","hooks_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/hooks","issue_events_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/events","assignees_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/tags","blobs_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/languages","stargazers_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/stargazers","contributors_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/contributors","subscribers_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/subscribers","subscription_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/subscription","commits_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/merges","archive_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/downloads","issues_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/labels{/name}","releases_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/deployments","created_at":"2017-09-21T19:24:11Z","updated_at":"2017-09-22T16:14:28Z","pushed_at":"2017-11-21T15:53:51Z","git_url":"git://github.com/Members1stFCU/Members1stFCU.github.io.git","ssh_url":"git@github.com:Members1stFCU/Members1stFCU.github.io.git","clone_url":"https://github.com/Members1stFCU/Members1stFCU.github.io.git","svn_url":"https://github.com/Members1stFCU/Members1stFCU.github.io","homepage":null,"size":882,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Members1stFCU:master","ref":"master","sha":"aee3422c844fd7bc9bb384b5553844aadcea6992","user":{"login":"Members1stFCU","id":10208409,"avatar_url":"https://avatars1.githubusercontent.com/u/10208409?v=4","gravatar_id":"","url":"https://api.github.com/users/Members1stFCU","html_url":"https://github.com/Members1stFCU","followers_url":"https://api.github.com/users/Members1stFCU/followers","following_url":"https://api.github.com/users/Members1stFCU/following{/other_user}","gists_url":"https://api.github.com/users/Members1stFCU/gists{/gist_id}","starred_url":"https://api.github.com/users/Members1stFCU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Members1stFCU/subscriptions","organizations_url":"https://api.github.com/users/Members1stFCU/orgs","repos_url":"https://api.github.com/users/Members1stFCU/repos","events_url":"https://api.github.com/users/Members1stFCU/events{/privacy}","received_events_url":"https://api.github.com/users/Members1stFCU/received_events","type":"Organization","site_admin":false},"repo":{"id":104389503,"name":"Members1stFCU.github.io","full_name":"Members1stFCU/Members1stFCU.github.io","owner":{"login":"Members1stFCU","id":10208409,"avatar_url":"https://avatars1.githubusercontent.com/u/10208409?v=4","gravatar_id":"","url":"https://api.github.com/users/Members1stFCU","html_url":"https://github.com/Members1stFCU","followers_url":"https://api.github.com/users/Members1stFCU/followers","following_url":"https://api.github.com/users/Members1stFCU/following{/other_user}","gists_url":"https://api.github.com/users/Members1stFCU/gists{/gist_id}","starred_url":"https://api.github.com/users/Members1stFCU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Members1stFCU/subscriptions","organizations_url":"https://api.github.com/users/Members1stFCU/orgs","repos_url":"https://api.github.com/users/Members1stFCU/repos","events_url":"https://api.github.com/users/Members1stFCU/events{/privacy}","received_events_url":"https://api.github.com/users/Members1stFCU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Members1stFCU/Members1stFCU.github.io","description":"Members1stFCU.github.io","fork":false,"url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io","forks_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/forks","keys_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/teams","hooks_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/hooks","issue_events_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/events","assignees_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/tags","blobs_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/languages","stargazers_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/stargazers","contributors_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/contributors","subscribers_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/subscribers","subscription_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/subscription","commits_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/merges","archive_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/downloads","issues_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/labels{/name}","releases_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/deployments","created_at":"2017-09-21T19:24:11Z","updated_at":"2017-09-22T16:14:28Z","pushed_at":"2017-11-21T15:53:51Z","git_url":"git://github.com/Members1stFCU/Members1stFCU.github.io.git","ssh_url":"git@github.com:Members1stFCU/Members1stFCU.github.io.git","clone_url":"https://github.com/Members1stFCU/Members1stFCU.github.io.git","svn_url":"https://github.com/Members1stFCU/Members1stFCU.github.io","homepage":null,"size":882,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4"},"html":{"href":"https://github.com/Members1stFCU/Members1stFCU.github.io/pull/4"},"issue":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/4"},"comments":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Members1stFCU/Members1stFCU.github.io/statuses/d322641cf151087af88dcfc2b0d35148ab9e6423"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"m1evankaiser"}}