Created
January 10, 2016 19:10
-
-
Save christopherbauer/05e320052672bfbb42ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Zipcode : ApiController | |
| { | |
| private readonly ZipcodeRepository zipcodeRepository; | |
| public Zipcode(ZipcodeRepository zipcodeRepository) | |
| { | |
| this.zipcodeRepository = zipcodeRepository; | |
| } | |
| public OkNegotiatedContentResult<string> Get(string zipcode, string state) | |
| { | |
| var model = zipcodeRepository.Get(zipcode); | |
| if (model == null || model.State == state) | |
| { | |
| return Ok("true"); | |
| } | |
| return Ok("Zipcode not in state!"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment