Beispiel #1
0
 public IActionResult OnGet(int id)
 {
     Location = _locationData.Get(id);
     if (Location == null)
     {
         return(RedirectToAction("Index", "Home"));
     }
     return(Page());
 }
Beispiel #2
0
        public IActionResult OnPost(long locationId)
        {
            var updatedLocation = locationData.Get(locationId);

            updatedLocation.TimeEntries.Add(new TimeEntry {
                Arrival = DateTime.Now
            });

            locationData.Update(locationId, updatedLocation);
            locationData.Commit();

            return(Redirect("./"));
        }
Beispiel #3
0
 public IEnumerable <Location> Get()
 {
     return(_data.Get());
 }