public void Create(HelpMarker helpMarker) { using (var client = Server.OpenClient()) { helpMarker.Owner = client.Query<User>(u => u.Email == helpMarker.Owner.Email).SingleOrDefault(); helpMarker.Id = helpMarker.GetHashCode(); helpMarker.CreatedOn = DateTime.Now; client.Store(helpMarker); } }
public HelpMarker MarkHelp(HelpMarker helpMarker) { helpMarkerRepository.Create(helpMarker); return helpMarker; }
public JsonResult MarkHelp(double lat, double lng) { var helpMarker = new HelpMarker(lat, lng, LoggedUser, GetHelpMarkerImage()); mapService.MarkHelp(helpMarker); return Json(helpMarker); }