예제 #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var location = await _context.GetLocation(id);

            _context.DeleteLocation(location);
            return(RedirectToAction(nameof(Index)));
        }
예제 #2
0
        public bool Delete(ApiLocation apiLocation)
        {
            Location location = new Location
            {
                ID         = apiLocation.ID,
                Name       = apiLocation.Name,
                CustomerID = apiLocation.CustomerID
            };

            return(locationManager.DeleteLocation(location));
        }
        public bool Delete(ApiLocation apiLocation)
        {
            //string id = User.Identity.Name;
            Location location = new Location
            {
                ID         = apiLocation.ID,
                Name       = apiLocation.Name,
                CustomerID = Helper.getCustID()
            };

            return(locationManager.DeleteLocation(location));
        }
예제 #4
0
 // DELETE api/<controller>/5
 public void Delete(string id)
 {
     _locationManager.DeleteLocation(id);
 }
예제 #5
0
 public Task <Location> DeleteLocation(Guid id)
 {
     return(_locationManager.DeleteLocation(id));
 }