public UsernameDto GetUsername(string username) { lock (Lock) { var query = new UsernameQuery(username); return _usernameQueryHandler.GetById(query); } }
public bool SetUsername(UsernameDto username) { lock (Lock) { var query = new UsernameQuery(username.Name); return _usernameQueryHandler.SetById<UsernameDto>(query, username); } }