public void Create(BusMarker busMarker)
 {
     using (var client = Server.OpenClient())
     {
         busMarker.Owner = client.Query<User>(u => u.Email == busMarker.Owner.Email).SingleOrDefault();
         busMarker.Id = busMarker.GetHashCode();
         busMarker.CreatedOn = DateTime.Now;
         client.Store(busMarker);
     }
 }
Beispiel #2
0
 public BusMarker MarkBus(BusMarker busMarker)
 {
     busMarkerRepository.Create(busMarker);
     return busMarker;
 }
Beispiel #3
0
 public JsonResult MarkBus(double lat, double lng)
 {
     var busMarker = new BusMarker(lat, lng, LoggedUser, GetBusMarkerImage());
     mapService.MarkBus(busMarker);
     return Json(busMarker);
 }