Add database commits
This commit is contained in:
@@ -64,6 +64,7 @@ namespace GerbilManagerWebAPI.Controllers
|
||||
}
|
||||
|
||||
this.unitOfWork.GerbilRepository.Insert(gerbil);
|
||||
this.unitOfWork.Save();
|
||||
|
||||
return CreatedAtAction(nameof(GetGerbil), new { id = gerbil.Id}, gerbil.AsDto());
|
||||
}
|
||||
@@ -85,6 +86,8 @@ namespace GerbilManagerWebAPI.Controllers
|
||||
};
|
||||
|
||||
unitOfWork.GerbilRepository.Update(updatedGerbil);
|
||||
this.unitOfWork.Save();
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
@@ -99,6 +102,7 @@ namespace GerbilManagerWebAPI.Controllers
|
||||
}
|
||||
|
||||
unitOfWork.GerbilRepository.Delete(existingGerbil);
|
||||
this.unitOfWork.Save();
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user