// PUT  http://localhost:14270/odata/Companies(2)
		// User-Agent: Fiddler
		// Host: localhost:14270
		// Content-type: application/json
		// Accept: application/json
		// Content-Length: 34
		// {"id":1,"name": "Company X"}
		//[Authorize(Roles = "Admin")]
		public async Task<IHttpActionResult> Put([FromODataUri] int key, TranslatedCompany updateCompany, [ValueProvider(typeof(CultureValueProviderFactory))] string culture = "en-US")
		{
			updateCompany.Culture = culture;

			if (!ModelState.IsValid)
			{
				return BadRequest(ModelState);
			}

			if (key != updateCompany.Id)
			{
				return BadRequest();
			}

			var company = new Company(updateCompany, new [] {culture});
			company.Map = UpdateMapImage(company.Map);
			var modelCompany = _companiesManager.Put(key, company);

			try
			{
				await _companiesManager.SaveChanges();
			}
			catch (DbUpdateConcurrencyException)
			{
				if (!_companiesManager.Exists(modelCompany.Id))
				{
					return NotFound();
				}
				else
				{
					throw;
				}
			}
			return Updated(modelCompany);

		}
		// POST http://localhost:14270/odata/Companies
		// User-Agent: Fiddler
		// Host: localhost:14270
		// Content-type: application/json
		// Accept: application/json
		// Content-Length: 26
		// {"logo":"http://dummyimage.com/200x200/000/fff.png","ceo":"John Doe","code":"company-a","name": "Comapany A","type":"Typical","industry":"bazinga","founded":"2015","headquarters":"Space","products":"Something","website":"http://www.companya.com","description":"Lorem ipsum dolor sit"}
		//[Authorize(Roles = "Admin")]
		public async Task<IHttpActionResult> Post(TranslatedCompany translatedCompany, [ValueProvider(typeof(CultureValueProviderFactory))] string culture = "en-US")
		{
			translatedCompany.Culture = culture;

			if (!ModelState.IsValid)
			{
				return BadRequest(ModelState);
			}

			try
			{
				var company = new Company(translatedCompany, _cultureManager.SupportedCultures);
				company.Map = UpdateMapImage(company.Map);
				var newCompany = _companiesManager.Post(company);

				await _companiesManager.SaveChanges();
				translatedCompany.Id = newCompany.Id;
				return Created(translatedCompany);
			}
			catch (Exception ex)
			{
				throw;
			}
		}