예제 #1
0
 private static MapRequest CreateMapRequest(MapRequestAVM mapRequestAVM)
 {
     var mapRequest = new MapRequest(mapRequestAVM.Email, mapRequestAVM.Latitude.Value, mapRequestAVM.Longitude.Value,DateTime.Now);
     using (MediatelModel context = new MediatelModel())
     {
         context.MapRequests.Add(mapRequest);
         context.SaveChanges();
     }
     return mapRequest;
 }
예제 #2
0
 public static MapSearchResultVM SearchForAddress(MapRequestAVM mapRequestAVM)
 {
     Validator.ValidateObject(mapRequestAVM, new ValidationContext(mapRequestAVM), true);
     MapRequest mapRequest = CreateMapRequest(mapRequestAVM);
     return SearchForAddress(mapRequest);
 }