public static externalDTO.Location MapFromDomain(internalDTO.Location location) { var res = location == null ? null : new externalDTO.Location() { Id = location.Id, Locations = location.Locations.Translate() }; return(res); }
public static externalDTO.Location MapFromDomain(internalDTO.Location Location) { var res = Location == null ? null : new externalDTO.Location() { Id = Location.Id, Name = Location.Name, Description = Location.Description, AppUserId = Location.AppUserId }; return(res); }
public async Task<string> GetPostcode(Location location) { var request = this.restRequestFactory.Create( $"/postcodes?lon={location.Longitude}&lat={location.Latitude}", Method.GET); var response = await this.GetClient().Execute(request); var json = Encoding.UTF8.GetString(response.RawBytes, 0, response.RawBytes.Length); var jobj = JObject.Parse(json); return ""; }
public ActionResult Create(Location createlocation) { Location location = new Location(); if (TryUpdateModel(location)) { location.AddedBy = db.Users.Single(u => u.UserName == User.Identity.Name); db.Locations.Add(location); db.SaveChanges(); return RedirectToAction("Index"); } return View(createlocation); }
private void Submit() { if (App.Instance.CorruptionSubmitted != null) { var location = new Location(""); var videoPath = ""; var audioPath = ""; var imagePath = ""; var description = ""; Corruption corruption = new Corruption { Location = location, Description = description, AudioPath = audioPath, VideoPath = videoPath, ImagePath = imagePath}; App.Instance.CorruptionSubmitted(corruption); } }
public void SetLocation(Location location) { Location = location; }