The Exclusive Check-Out Model
The Exclusive Check-Out Model lets only one user at a time to modify a specific resource. Let's suppose Mary will be the first developer to begin her work. When she opens the RoomManager.cs
file and begins to modify it to implement the GetAllRooms method, by default, Visual Studio will silently try to check it out for editing. If the file isn't already checked out to another user, the operation will succeed and the file can be successfully edited.
Looking at the Output window for Source Control reveals the automatic check-out operation:
In the Solution Explorer window, the Source Control icon changes as we expect to a red check mark, showing the file is checked out to the current user, in this case to Mary:
Now, Mary can implement the method without further issues.
While she does her work, John comes in and wants to implement the UpdateRooms method. He opens the RoomManager.cs
file and begins typing to implement the method's body. As in Mary's case, Visual Studio...