public ActionResult <Member> DeleteMember(Guid id)
        {
            if (id == null)
            {
                return(StatusCode(500));
            }

            int rowsAffected = _membersRepository.DeleteMember(id);

            return(StatusCode(200, rowsAffected == 1));
        }
예제 #2
0
        public void DeleteMember(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                throw new ArgumentException("Member ID must be set");
            }

            if (_membersRepository.GetMember(id) == null)
            {
                throw new KeyNotFoundException("Member not found");
            }

            _membersRepository.DeleteMember(id);
        }
예제 #3
0
 public void DeleteMember(Guid id)
 {
     _membersRepository.DeleteMember(id);
 }
예제 #4
0
 public void DeleteMember(Guid id)
 {
     Response.StatusCode = 200;
     _membersRepository.DeleteMember(id);
 }
 public IActionResult Delete(int id)
 {
     _repo.DeleteMember(id);
     return(RedirectToAction("Index"));
 }