Programming Entity Framework Building Data Centric Apps with the ADO NET Entity Framework Second Edition Julia Lerman download
Programming Entity Framework Building Data Centric Apps with the ADO NET Entity Framework Second Edition Julia Lerman download
https://ebookfinal.com/download/programming-entity-framework-
building-data-centric-apps-with-the-ado-net-entity-framework-
second-edition-julia-lerman/
https://ebookfinal.com/download/entity-framework-6-recipes-second-
edition-driscoll/
https://ebookfinal.com/download/entity-framework-core-cookbook-2nd-
edition-ricardo-peres/
https://ebookfinal.com/download/wcf-multi-layer-services-development-
with-entity-framework-4th-edition-edition-mike-liu/
https://ebookfinal.com/download/programming-microsoft-linq-in-net-
framework-4-1st-edition-pialorsi/
Programming NET Compact Framework 3 5 2nd Edition Paul Yao
https://ebookfinal.com/download/programming-net-compact-
framework-3-5-2nd-edition-paul-yao/
https://ebookfinal.com/download/murach-s-ado-net-4-database-
programming-with-c-2010-4th-edition-anne-boehm/
https://ebookfinal.com/download/asp-net-mvc-framework-unleashed-1st-
edition-stephen-walther/
https://ebookfinal.com/download/net-framework-essentials-1-ed-edition-
thuan-l-thai/
https://ebookfinal.com/download/equality-the-legal-framework-second-
edition-bob-hepple/
Programming Entity Framework Building Data Centric
Apps with the ADO NET Entity Framework Second
Edition Julia Lerman Digital Instant Download
Author(s): Julia Lerman
ISBN(s): 9780596807269, 0596807260
Edition: Second Edition
File Details: PDF, 9.09 MB
Year: 2010
Language: english
SECOND EDITION
Julia Lerman
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or [email protected].
Editors: Mike Hendrickson and Laurel Ruma Indexer: Ellen Troutman Zaig
Production Editor: Loranah Dimant Cover Designer: Karen Montgomery
Copyeditor: Audrey Doyle Interior Designer: David Futato
Proofreader: Sada Preisch Illustrator: Robert Romano
Printing History:
February 2009: First Edition.
August 2010: Second Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Programming Entity Framework, the image of a Seychelles blue pigeon, and related
trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
.NET is a registered trademark of Microsoft Corporation.
While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-0-596-80726-9
[SB]
1281106344
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
iii
The EDM Within the Entity Framework 20
Walkthrough: Building Your First EDM 21
Inspecting the EDM in the Designer Window 24
Entity Container Properties 26
Entity Properties 26
Entity Property Properties 27
The Model’s Supporting Metadata 29
Viewing the Model in the Model Browser 31
Viewing the Model’s Raw XML 31
CSDL: The Conceptual Schema 33
EntityContainer 34
EntitySet 35
EntityType 36
Associations 38
Navigation Property 41
Navigation Properties That Return Collections 42
SSDL: The Store Schema 43
MSL: The Mappings 45
Database Views in the EDM 46
Summary 47
iv | Table of Contents
Avoiding Inadvertent Query Execution 74
Summary 75
Table of Contents | v
DbDataRecords and Nonscalar Properties 114
Projecting with Query Builder Methods 115
Using Navigation in Entity SQL Queries 115
Navigating to an EntityReference 115
Filtering and Sorting with an EntityReference 116
Filtering and Sorting with EntityCollections 116
Aggregating with EntityCollections 117
Using Entity SQL SET Operators 117
Aggregating with Query Builder Methods 118
Using Joins 118
Nesting Queries 119
Grouping in Entity SQL 120
Returning Entities from an Entity SQL GROUP BY Query 121
Filtering Based on Group Properties 121
Shaping Data with Entity SQL 122
Using Include with an ObjectQuery and Entity SQL 123
Understanding Entity SQL’s Wrapped and Unwrapped Results 124
Entity SQL Rules for Wrapped and Unwrapped Results 126
Digging a Little Deeper into EntityClient’s Results 126
Summary 127
vi | Table of Contents
Mapping a Function to a Scalar Type 159
Mapping a Function to a Complex Type 160
Summary 163
Table of Contents | ix
Accessing Foreign Keys When There Is No Foreign Key Property 308
Working with Related EntityReference Data 309
Using EntityDataSource.Include to Get Related Data 309
Displaying Data That Comes from EntityReference
Navigation Properties 310
Using a New EntityDataSource Control to Enable Editing
of EntityReference Navigation Properties 312
Editing EntityReferences That Cannot Be Satisfied
with a Drop-Down List 313
Binding an EntityDataSource to Another Control
with WhereParameters 314
Editing Related Data Concurrently with Multiple
EntityDataSource Controls 316
Working with Hierarchical Data in a Master/Detail Form 317
Setting Up the Web Application 317
Specifying Your Own Entity SQL Query Expression
for an EntityDataSource 318
Binding a DropDownList to an EntityDataSource Control 319
Creating a Parent EntityDataSource That Is Controlled
by the DropDownList and Provides Data to a DetailsView 320
Using the EntityDataSource.Where Property to Filter Query Results 321
Displaying Read-Only Child Data Through the Parent
EntityDataSource 321
Using a New EntityDataSource to Add a Third Level of Hierarchical
Data to the Master/Detail Form 323
Using the EntityDataSource.Inserting Event to Help with Newly
Added Entities 325
Testing the Application 326
Exploring EntityDataSource Events 327
Building Dynamic Data Websites 329
Summary 332
x | Table of Contents
Using Proxies to Enable Change Notification, Lazy Loading,
and Relationship Fix-Up 345
Change Notification by Proxy 346
Lazy Loading by Proxy 346
Exploring the Proxy Classes 347
Synchronizing Relationships by Proxy 348
Using T4 to Generate POCO Classes 350
Modifying the POCO Template 354
Creating a Model That Works with Preexisting Classes 358
Code First: Using Entity Framework with No Model at All 359
Summary 359
14. Customizing Entity Data Models Using the EDM Designer . . . . . . . . . . . . . . . . . . . . 361
Mapping Table per Type Inheritance for Tables That Describe
Derived Types 362
Mapping TPT Inheritance 363
Querying Inherited Types 365
POCO Classes and Inherited Objects 366
Inserting TPT Inherited Types 366
Specifying or Excluding Derived Types in Queries 368
Creating New Derived Entities When the Base Entity Already Exists 370
TPT with Abstract Types 371
Mapping Unique Foreign Keys 373
Mapping an Entity to More Than One Table 375
Merging Multiple Entities into One 376
Querying, Editing, and Saving a Split Entity 378
Mapping Stored Procedures to Split Tables and More 380
Splitting a Single Table into Multiple Entities 381
Filtering Entities with Conditional Mapping 383
Creating a Conditional Mapping for the Activity Entity 385
Querying, Inserting, and Saving with Conditional Mappings 385
Filtering on Other Types of Conditions 387
Removing the Conditional Mapping from Activity and Re-creating
the Category Property 388
Implementing Table per Hierarchy Inheritance for Tables That Contain
Multiple Types 389
Creating the Resort Derived Type 390
Setting a Default (Computed) Value on the Table Schema 391
Testing the TPH Mapping 392
Choosing to Turn a Base Class into an Abstract Class 393
Creating Complex Types to Encapsulate Sets of Properties 393
Defining a Complex Type 394
Reusing Complex Types 396
Table of Contents | xi
Querying, Creating, and Saving Entities That Contain Complex Types 397
Removing the Complex Types from the Model 398
Using Additional Customization Options 399
Using GUIDs for EntityKeys 399
Mapping Stored Procedures 399
Mapping Multiple Entity Sets per Type 399
Mapping Self-Referencing Associations 400
Summary 401
15. Defining EDM Mappings That Are Not Supported by the Designer . . . . . . . . . . . . . 403
Using Model-Defined Functions 403
Using Model-Defined Functions to Return More Complex Results 407
Consuming the Complex Results 408
Reading the Results from a Complex Function 408
Mapping Table per Concrete (TPC) Type Inheritance for Tables
with Overlapping Fields 409
Using QueryView to Create Read-Only Entities and Other Specialized
Mappings 411
Finding a Common Use Case for QueryView 413
Creating a CustomerNameAndID Entity 413
Creating a QueryView Mapping for CustomerNameAndID 414
Testing the QueryView 416
Deconstructing the QueryView 416
Summary 417
16. Gaining Additional Stored Procedure and View Support in the Raw XML . . . . . . . 419
Reviewing Procedures, Views, and UDFs in the EDM 419
Working with Stored Procedures That Return Data 420
Using Functions That Match an Entity Whose Property Names Have
Been Changed 420
Query Stored Procedures and Inherited Types 421
Composing Queries Against Functions 423
Replacing Stored Procedures with Views for Composability 423
Queries That Return Multiple Result Sets 424
Executing Queries on Demand with ExecuteStoreQuery 424
Querying to a Class That Is Not an Entity 424
Querying into an Entity 425
Adding Native Queries to the Model 426
Defining a Complex Type in the Model Browser 427
Adding Native Views to the Model 429
DefiningQuery Is Already in Your Model 429
Using DefiningQuery to Create Your Own Views 431
Implementing a DefiningQuery 433
20. Real World Apps: Connections, Transactions, Performance, and More . . . . . . . . . . 555
Entity Framework and Connections 555
Overriding EntityConnection Defaults 556
Working with Connection Strings Programmatically 557
Opening and Closing Connections 560
Getting the Store Connection from EntityConnection 562
Disposing Connections 562
Pooling Connections 563
Fine-Tuning Transactions 564
Why Use Your Own Transaction? 564
Understanding Implicit Entity Framework Transactions 565
Specifying Your Own Read/Write Transactions 566
Specifying Your Own Read-Only Transactions 569
Rolling Back Transactions 570
Understanding Security 571
Guarding Against SQL Injection 571
Guarding Against Connection Piggybacks 573
Fine-Tuning Performance 574
Measuring Query Performance 575
Measuring Startup Performance 579
Reducing the Cost of Query Compilation 580
Caching for Entity SQL Queries 580
Precompiling Views for Performance 582
Precompiling LINQ to Entities Queries for Performance 585
Fine-Tuning Updates for Performance? 589
Lacking Support for Full Text Searches 590
Exploiting Multithreaded Applications 591
Table of Contents | xv
Forcing an ObjectContext to Use Its Own Thread 591
Implementing Concurrent Thread Processing 593
Exploiting .NET 4 Parallel Computing 596
Summary 596
Dinner was soon over after this, and she left him, as usual, to have his
cigarette and glass of port, and went into the drawing-room, and stood
looking on the last fading splendour of the sunset in the west. The
momentary bitterness in her mind had quite died down again: there was
nothing left but a vague, dull ache of flatness and disappointment. He had
noticed nothing of all that had caused her such tremulous and secret joy. He
had looked on her smoothed and softened face, and seen no difference
there, on her brown unfaded hair and found it unaltered. He had only seen
that she had put her best gown on, and she had almost wished that he had
not noticed that, since then she might have had the consolation of thinking
that he was ill. It was not, it must be premised, that she meant she would
find pleasure in his indisposition, only that an indisposition would have
explained his imperceptiveness, which she regretted more than she would
have regretted a slight headache for him.
For a few minutes she was incapable of more than blank and empty
contemplation of the utter failure of that from which she had expected so
much. Then, like the stars that even now were beginning to be lit in the
empty spaces of the sky, fresh points in the dreary situation claimed her
attention. Was he preoccupied with other matters, that he was blind to her?
His letters, it is true, had been uniformly cheerful and chatty, but a
preoccupied man can easily write a letter without betraying the
preoccupation that is only too evident in personal intercourse. If this was so,
what was the nature of his preoccupation? That was not a cheerful star:
there was a green light in it.... Another star claimed her attention. Was it
Lyndhurst who was blind, or herself who saw too much? She had no idea
till she came to look into the matter closely, how much grey hair was
mingled with the brown. Perhaps he had no idea either: its restoration,
therefore, would not be an affair of surprise and admiration. But the
wrinkles....
She faced round from the window as he entered, and made another call
on her courage and conviction. Though he saw so little, she, quickened
perhaps by the light of the green star, saw how good-looking he was. For
years she had scarcely noticed it. She put up her small face to him in a way
that suggested, though it did not exactly invite a kiss.
“It is so nice to be home again,” she said.
The suggestion that she meant to convey occurred to him, but, very
reasonably, he dismissed it as improbable. A promiscuous caress was a
thing long obsolete between them. Morning and evening he brushed her
cheek with the end of his moustaches.
“Well, then, we’re all pleased,” he said good-humouredly. “Shall I ring
for coffee, Amy?”
She was not discouraged.
“Do,” she said, “and when we have had coffee, will you fetch a shawl
for me, and we will stroll in the garden. You shall show me what new
flowers have come out.”
The intention of that was admirable, the actual proposal not so happy,
since a glimmering starlight through the fallen dusk would not conduce to a
perception of colour.
“We’ll stroll in the garden by all means,” he said, “if you think it will not
be risky for you. But as to flowers, my dear, it will be easier to appreciate
them when it is not dark.”
Again she put up her face towards him. This time he might, perhaps,
have taken the suggestion, but at the moment Parker entered with the
coffee.
“How foolish of me,” she said. “I forgot it was dark. But let us go out
anyhow, unless you were thinking of going round to the club.”
“Oh, time for that, time for that,” said he. “I expect you will be going to
bed early after your long journey. I may step round then, and see what’s
going on.”
Without conscious encouragement or welcome on her part, a suspicion
darted into her mind. She felt by some process, as inexplicable as that by
which certain people are aware of the presence of a cat in the room, that he
was going round to see Mrs. Evans.
“I suppose you have often gone round to the club in the evening since I
have been away,” she said.
“Yes, I have looked in now and again,” he said. “On other evenings I
have dropped in to see our friends. Lonely old bachelor, you know, and
Harry was not always very lively company. It’s a good thing that boy has
gone back to Cambridge, Amy. He was always mooning round after Mrs.
Evans.”
That was a fact: it had often been a slightly inconvenient one. Several
times the Major had “dropped in” to see Millie, and found his son already
there.
“But I thought you were rather pleased at that, Lyndhurst,” she said.
“You told me you considered it not a bad thing: that it would keep Harry out
of mischief.”
He finished his coffee rather hastily.
“Yes, within reason, within reason,” he said. “Well, if we are to stroll in
the garden, we had better go out. You wanted a shawl, didn’t you? Very
wise: where shall I find one?”
That diverted her again to her own personal efforts.
“There are several in the second tray of my wardrobe,” she said.
“Choose a nice one, Lyndhurst, something that won’t look hideous with my
pink silk.”
The smile, as you might almost say, of coquetry, which accompanied this
speech, faded completely as soon as he left the room, and her face assumed
that business-like aspect, which the softest and youngest faces wear, when
the object is to attract, instead of letting a mutual attraction exercise its
inevitable power. Even though Mrs. Ames’ object was the legitimate and
laudable desire to attract her own husband, it was strange how common her
respectable little countenance appeared. She had adorned herself to attract
admiration: coquetry and anxiety were pitifully mingled, even as you may
see them in haunts far less respectable than this detached villa, and on faces
from which Mrs. Ames would instantly have averted her own. She hoped he
would bring a certain white silk shawl: two nights ago she had worn it on
the verandah after dinner at Overstrand, and the reflected light from it, she
had noticed, as she stood beneath a light opposite a mirror in the hall, had
made her throat look especially soft and plump. She stood underneath the
light now waiting for his return.
Fortune was favourable: it was that shawl that he brought, and she turned
round for him to put it on her shoulders. Then she faced him again in the
remembered position, underneath the light, smiling.
“Now, I am ready, Lyndhurst,” she said.
He opened the French window for her, and stood to let her pass out.
Again she smiled at him, and waited for him to join her on the rather
narrow gravel path. There was actually room for two abreast on it, for, on
the evening of her dinner-party, Harry had walked here side by side with
Mrs. Evans. But there was only just room.
“You go first, Amy,” he said, “or shall I? We can scarcely walk abreast
here.”
But she took his arm.
“Nonsense, my dear,” she said. “There: is there not heaps of room?”
He felt vaguely uncomfortable. It was not only the necessity of putting
his feet down one strictly in front of the other that made him so.
“Anything the matter, my dear?” he asked.
The question was not cruel: it was scarcely even careless. He could
hardly be expected to guess, for his perceptions were not fine. Also he was
thinking about somebody else, and wondering how late it was. But even if
he had had complete knowledge of the situation about which he was
completely ignorant, he could not have dealt with it in a more peremptory
way. The dreary flatness to which she had been so impassive a prey directly
after dinner, the sense of complete failure enveloped her like impenetrable
fog. Out of that fog, she hooted, so to speak, like an undervitalized siren.
“I am only so glad to get back,” she said, pressing his arm a little. “I
hoped you were glad, too, that I was back. Tell me what you have been
doing all the time I have been away.”
This, like banns, was for the third time of asking. He recalled for her the
days one by one, leaving out certain parts of them. Even at the moment, he
was astonished to find how vivid his recollection of them was. On
Thursday, when he had played golf in the morning, he had lunched with the
Evans’ (this he stated, for Harry had lunched there too) and he had culled
probably the last dish of asparagus in the afternoon. He had dined alone
with Harry that night, and Harry had toothache. Next day, consequently,
Harry went to the dentist in the morning, and he himself had played golf in
the afternoon. That he remembered because he had gone to tea with Mrs.
Evans afterwards, but that he did not mention, for he had been alone with
her, and they had talked about being misunderstood and about affinities. On
Saturday Harry had gone back to Cambridge, but, having missed his train,
he had made a second start after lunch. He had met Dr. Evans in the street
that day, going up to the golf links, and since he would otherwise be quite
alone in the evening, he had dined with them, “en garçon.”
This catalogue of trivial happenings took quite a long time in the
recitation. But below the trivialities there was a lurking significance. He
was not really in love with Millie Evans, and his assurance to himself on
that point was perfectly honest. But (this he did not put so distinctly to
himself) he thought that she was tremendously attracted by him. Here was
an appeal to a sort of deplorable sense of gallantry—so terrible a word only
can describe his terrible mind—and mentally he called her “poor little
lady.” She was pretty, too, and not very happy. It seemed to be incumbent
on him to interest and amuse her. His “droppings in” amused her: when he
got ready to drop out again, she always asked when he would come to see
her next. These “droppings in” were clearly bright spots to her in a drab
day. They were also bright spots to him, for he was more interested in them
than in all his sweet-peas. There was a “situation” come into his life,
something clandestine. It would never do, for instance, to let Amy or the
estimable doctor get a hint of it. Probably they would misunderstand it, and
imagine there was something to conceal. He had the secret joys of a
bloodless intrigue. But, considering its absolute bloodlessness, he was
amazingly wrapped up in it. It was no wonder that he did not notice the
restored colour of Amy’s hair.
He, or rather Mrs. Evans, had made a conditional appointment for to-
night. If possible, the possibility depending on Amy’s fatigue, he was going
to drop in for a chat. Primarily the chat was to be concerned with the
lighting of the garden by means of Chinese lanterns, for a nocturnal fête
that Mrs. Evans meant to give on her birthday. The whole garden was to be
lit, and since the entertainment of an illuminated garden, with hot soup,
quails and ices, under the mulberry-tree was obviously new to Riseborough,
it would be sufficiently amusing to the guests to walk about the garden till
supper-time. But there would be supererogatory diversions beyond that,
bridge-tables in the verandah, a small band at the end of the garden to
intervene its strains between the guests and the shrieks of South-Eastern
expresses, and already there was an idea of fancy dress. Major Ames
favoured the idea of fancy dress, for he had a red velvet garment, sartorially
known as a Venetian cloak, locked away upstairs, which was a dazzling
affair if white tights peeped out from below it. He knew he had a leg, and
only lamented the scanty opportunities of convincing others of the fact. But
the lighting of the garden had to be planned first: there was no use in having
a leg in a garden, if the garden was not properly lit. But the whole affair was
as yet a pledged secret: he could not, as a man of honour, tell Amy about it.
Short notice for a fête of this sort was of no consequence, for it was to be a
post-prandial entertainment, and the only post-prandial entertainment at
present existent in Riseborough was going to bed. Thus everybody would
be able to be happy to accept.
A rapid résumé of this made an undercurrent in his mind, as he went
through, in speaking voice, the history of the last days. Up and down the
narrow path they passed, she still with her hand in his arm, questioning,
showing an inconceivable interest in the passage of the days from which he
had left out all real points of interest. His patience came to an end before
hers.
“Upon my word, my dear,” he said, “it’s getting a little chilly. Shall we
go in, do you think? I’m sure you are tired with your journey.”
There was nothing more coming: she knew that. But even in the midst of
her disappointment, she found consolation. Daylight would show the re-
establishment of her youthfulness more clearly than electric light had done.
Every one looked about the same by electric light. And though, in some
secret manner, she distrusted his visit to the club, she knew how impolitic it
would be to hint, however remotely, at such distrust. It was much better this
evening to acquiesce in the imputation of fatigue. Nor was the imputation
groundless; for failure fatigues any one when under the same conditions
success would only stimulate. And in the consciousness of that, her
bitterness rose once more to her lips.
“You mustn’t catch cold,” she said. “Let us go in.”
It was still only half-past ten: all this flatness and failure had lasted but a
couple of hours, and Major Ames, as soon as his wife had gone upstairs, let
himself out of the house. His way lay past the doors of the club, but he did
not enter, merely observing through its lit windows that there were a good
many men in the smoking-room. On arrival at the Doctor’s he found that
Elsie and her father were playing chess in the drawing-room, and that Mrs.
Evans was out in the garden. He chose to go straight into the garden, and
found her sitting under the mulberry, dressed in white, and looking rather
like the Milky Way. She did not get up, but held out her hand to him.
“That is nice of you,” she said. “How is Cousin Amy?”
“Amy is very well,” said he. “But she’s gone to bed early, a little tired
with the journey. And how is Cousin Amy’s cousin?”
He sat down on the basket chair close beside her which creaked with his
weight.
“I must have a special chair made for you,” she said. “You are so big and
strong. Have you seen Cousin Amy’s cousin’s husband?”
“No: I heard you were out here. So I came straight out.”
She got up.
“I think it will be better, then, if we go in, and tell him you are here,” she
said. “He might think it strange.”
Major Ames jumped up with alacrity: with his alacrity was mingled a
pleasing sense of adventure.
“By all means,” he said. “Then we can come out again.”
She smiled at him.
“Surely. He is playing chess with Elsie. I do not suppose he will interrupt
his game.”
Apparently Dr. Evans did not think anything in the least strange. On the
whole, this was not to be wondered at, since he knew quite well that Major
Ames was coming to talk over garden illumination with his wife.
“Good evening, Major,” he said; “kind of you to come. You and my little
woman are going to make a pauper of me, I’m told. There, Elsie, what do
you say to my putting my knight there? Check.”
“Pig!” said Elsie.
“Then shall we go out, Major Ames?” said Millie. “Are you coming out,
Wilfred?”
“No, little woman. I’m going to defeat your daughter indoors. Come and
have a glass of whisky and soda with me before you go, Major.”
They went out again accordingly into the cool starlight.
“Wilfred is so fond of chess,” she said. “He plays every night with Elsie,
when he is at home. Of course, he is often out.”
This produced exactly the effect that she meant. She did not comment or
complain: she merely made a statement which arose naturally from what
was going on in the drawing-room.
But Major Ames drew the inference that he was expected to draw.
“Glad I could come round,” he said. “Now for the lanterns. We must
have them all down the garden wall, and not too far apart, either. Six feet
apart, eh? Now I’ll step the wall and we can calculate how many we shall
want there. I think I step a full yard still. Not cramped in the joints yet.”
It took some half hour to settle the whole scheme of lighting, which,
since Major Ames was not going to pay for it, he recommended being done
in a somewhat lavish manner. With so large a number of lanterns, it would
be easily possible to see his leg, and he was strong on the subject of fancy
dress.
“There’ll be some queer turn-outs, I shouldn’t wonder,” he said; “but I
expect there will be some creditable costumes too. By Jove! it will be quite
the event of the year. Amy and I, with our little dinners, will have to take a
back seat, as they say.”
“I hope Cousin Amy won’t think it forward of me,” said Millie.
Major Ames said that which is written “Pshaw.” “Forward?” he cried.
“Why, you are bringing a bit of life among us. Upon my word, we wanted
rousing up a bit. Why, you are a public benefactor.”
They had sat down to rest again after their labour of stepping out the
brick walls under the mulberry-tree, where the grass was dry, and only a
faint shimmer of starlight came through the leaves. At the bottom of the
garden a train shrieked by, and the noise died away in decrescent thunder.
She leaned forward a little towards him, putting up her face much as Amy
had done.
“Ah, if only I thought I was making things a little pleasant,” she said.
Suddenly it struck Major Ames that he was expected to kiss her. He
leaned forward, too.
“I think you know that,” he said. “I wish I could thank you for it.”
She did not move, but in the dusk he could see she was smiling at him. It
looked as if she was waiting. He made an awkward forward movement and
kissed her.
There was silence a moment: she neither responded to him nor repelled
him.
“I suppose people would say I ought not to have let you,” she said. “But
there is no harm, is there? After all, you are a—a sort of cousin. And you
have been so kind about the lanterns.”
Major Ames was thinking almost entirely about himself, hardly at all
about her. An adventure, an intrigue had begun. He had kissed somebody
else’s wife and felt the devil of a fellow. But with the wine of this emotion
was mingled a touch of alarm. It would be wise to call a halt, take his
whisky and soda with her husband, and get home to Amy.
CHAPTER VI
Mrs. Altham waited with considerable impatience next day for the
return of her husband from the club, where he went on most afternoons, to
sit in an arm-chair from tea-time to dinner and casually to learn what had
happened while he had been playing golf. She had been to call on Mrs.
Ames in the afternoon, and in consequence had matter of considerable
importance to communicate. She could have supported that retarded spate
of information, though she wanted to burst as soon as possible, but she had
also a question to ask Henry on which a tremendous deal depended. At
length she heard the rattle of his deposited hat and stick in the hall, and she
went out to meet him.
“How late you are, Henry,” she said; “but you needn’t dress. Mrs.
Brooks, if she does come in afterwards, will excuse you. Dinner is ready:
let us come in at once. Now, you were at the club last night, after dinner.
You told me who was there; but I want to be quite sure.”
Mr. Altham closed his eyes for a moment as he sat down. It looked as if
he was saying a silent grace, but appearances were deceptive. He was only
thinking, for he knew his wife would not ask such a question unless
something depended on it, and he desired to be accurate.
Then he opened them again, and helped the soup with a name to each
spoonful.
“General Fortescue,” he said. “Young Morton. Mr. Taverner, Turner,
Young Turner.”
That was five spoonfuls—three for his wife, two for himself. He was not
very fond of soup.
“And you were there all the time between ten and eleven?” asked his
wife.
“Till half-past eleven.”
“And there was no one else?”
Mr. Altham looked up brightly.
“The club waiter,” he said, “and the page. The page has been dismissed
for stealing sugar. The sugar bill was preposterous. That was how we found
out. Did you mean to ask about that?”
“No, my dear. Nor do I want to know.”
At the moment the parlour-maid left the room, and she spoke in an eager
undertone.
“Mrs. Ames told me that Major Ames went up to the club last night,
when she went to bed at half-past ten,” she said. “You told me at breakfast
whom you found there, but I wanted to be sure. Call them Mr. and Mrs.
Smith and then we can go on talking.”
The parlour-maid came back into the room.
“Yes, Mr. Smith apparently went up to the club at half-past ten,” she
said. “But he can’t have gone to the club, for in that case you would have
seen him. It has occurred to me that he didn’t feel well, and went to the
doctor’s.”
“It seems possible,” said Mr. Altham, not without enthusiasm,
understanding that “doctor” meant “doctor,” and which doctor.
“We have all noticed how many visits he has been paying to—to Dr.
Jones,” said Mrs. Altham, “during the time Mrs. Smith was away. But to
pay another one on the very evening of her return looks as if—as if
something serious was the matter.”
“My dear, there’s nothing whatever to show that Major Ames went to the
doctor’s last night,” he said.
Mrs. Altham gave him an awful glance, for the parlour-maid was in the
room, and this thoughtless remark rendered all the diplomatic substitution
of another nomenclature entirely void and useless.
“Mrs. Smith, I should say,” added Mr. Altham in some confusion,
proceeding to make it all quite clear to Jane, in case she had any doubts
about it.
“Suggest to me any other reasonable theory as to where he was, then,”
said Mrs. Altham.
“I can’t suggest where he was, my dear,” said Mr. Altham, finding his
legal training supported him, “considering that there is no evidence of any
kind that bears upon the matter. But to know that a man was not in one
given place does not show with any positiveness that he was at any other
given place.”
“No doubt, then, he went shopping at half-past ten last night,” said Mrs.
Altham, with deep sarcasm. “There are so many shops open then. The High
Street is a perfect blaze of light.”
Mr. Altham could be sarcastic, too, though he seldom exercised this gift.
“It quite dazzles one,” he observed.
Mrs. Altham no doubt was vexed at her husband’s sceptical attitude, and
she punished him by refraining from discussing the point any further, and
from giving him the rest of her news. But this severity punished herself
also, for she was bursting to tell him. When Jane had finally withdrawn, the
internal pressure became irresistible.
“Mrs. Ames has done something to her hair, Henry,” she said; “and she
has done something to her face. I had a good mind to ask her what she had
used. I assure you there was not a grey hair left anywhere, and a fortnight
ago she was as grey as a coot!”
“Coots are bald, not grey,” remarked her husband.
“That is mere carping, Henry. She is brown now. Is this another fashion
she is going to set us at Riseborough? What does it all mean? Shall we all
have to plaster our faces with cold cream, and dye our hair blue?”
Mr. Altham was in a painfully literal mood this evening and could not
disentangle information from rhetoric.
“Has she dyed her hair blue?” he asked in a slightly awestricken voice.
“No, my dear: how can you be so stupid? And I told you just now she
was brown. But at her age! As if anybody cared what colour her hair was.
Her face, too! I don’t deny that the wrinkles are less marked, but who cares
whether she is wrinkled or not?”
These pleasant considerations were discontinued by the sound of the
postman’s tap on the front door, and since the postman took precedence of
everybody and everything, Mr. Altham hurried out to see what excitements
he had piloted into port. Unfortunately, there was nothing for him, but there
was a large, promising-looking envelope for his wife. It was stiff, too, and
looked like the receptacle of an invitation card.
“One for you, my dear,” he said.
Mrs. Altham tore it open, and gave a great gasp.
“You would not guess in a hundred tries,” she said.
“Then be so kind as to tell me,” remarked her husband.
Mrs. Altham read it out all in one breath without stops.
“Mrs. Evans at home Thursday July 20 10 p.m. Shakespeare Fancy
Dress well I never!”
For a while little the silence of stupefaction reigned. Then Mr. Altham
gave a great sigh.
“I have never been to a fancy dress ball,” he said. “I think I should feel
very queer and uncomfortable. What are we meant to do when we get there,
Julia? Just stand about and look at each other. It will seem very strange.
What would you recommend me to be? I suppose we ought to be a pair.”
Mrs. Altham, to do her justice, had not thought seriously about her
personal appearance for years. But, as she got up from the table, and
consciously faced the looking-glass over the chimney-piece, it is idle to
deny that she considered it now. She was not within ten years of Mrs.
Ames’ age, and it struck her, as she carefully regarded herself in a perfectly
honest glass, that even taking into full consideration all that Mrs. Ames had
been doing to her hair and her face, she herself still kept the proper measure
of their difference of years between them. But it was yet too early to
consider the question of her impersonation. There were other things
suggested by the contemplation of a fancy-dress ball to be considered first.
There was so much, in fact, that she hardly knew where to begin. So she
whisked everything up together, in the manner of a sea-pie, in which all that
is possibly edible is put in the oven and baked.
“There will be time enough to talk over that, my dear,” she said, “for if
Mrs. Evans thinks we are all going to lash out into no end of expense in
getting dresses for her party, she is wrong as far as I, for one, am concerned.
For that matter you can put on your oldest clothes, and I can borrow Jane’s
apron and cap, and we can go as Darby and Joan. Indeed, I do not know if I
shall go at all—though, of course, one wouldn’t like to hurt Mrs. Evans’
feelings by refusing. Do you know, Henry, I shouldn’t in the least wonder if
we have seen the last of Mrs. Ames and all her airs of superiority and
leadership. You may depend upon it that Mrs. Evans did not consult her
before she settled to give a fancy dress party. It is far more likely that she
and Major Ames contrived it all between them, while Mrs. Ames was away,
and settled what they should go as, and I daresay it will be Romeo and
Juliet. I should not be in the least surprised if Mrs. Ames did not go to the
party at all, but tried to get something up on her own account that very
night. It would be like her, I am sure. But whether she goes or not, it seems
to me that we have seen the last of her queening it over us all. If she does
not go, I should think she would be the only absentee, and if she does, she
goes as Mrs. Evans’ guest. All these years she has never thought of a fancy
dress party——”
Mrs. Altham broke off in the middle of her address, stung by the
splendour of a sudden thought.
“Or does all this staying away on her part,” she said, “and dyeing her
hair, and painting her face, mean that she knew about it all along, and was
going to be the show-figure of it all? I should not wonder if that was it. As
likely as not, she and Major Ames will come as Hamlet and Ophelia, or
something equally ridiculous, though I am sure as far as the ‘too too solid
flesh’ goes, Major Ames would make an admirable Hamlet, for I never saw
a man put on weight in the manner he does, in spite of all the garden
rolling, which I expect the gardener does for him really. But whatever is the
truth of it all, and I’m sure every one is so secretive here in Riseborough
nowadays, that you never know how many dined at such a place on such a
night unless you actually go to the poulterer’s and find out whether one
chicken or two was sent,—what was I saying?”
She had been saying a good deal. Mr. Altham correctly guessed the train
of thought which she desired to recall.
“In spite of the secretiveness——” he suggested.
That served the purpose.
“No, my dear Henry,” said his wife rapidly, “I accuse no one of
secretiveness: if I did, you misunderstood me. All I meant was that when we
have settled what we are to go as, we will tell nobody. There is very little
sense in a fancy dress entertainment if you know exactly what you may
expect, and as soon as you see a Romeo can say for certain that it is Major
Ames, for instance; and I’m sure if he is to go as Romeo, it would be vastly
suitable if Mrs. Ames went as Juliet’s nurse.”
“I am not sure that I shall like so much finery,” said Mr. Altham, who
was thinking entirely about his own dress, and did not care two straws
about Major or Mrs. Ames. “It will seem very strange.”
“Nonsense, my dear; we will dine in our fancy dresses for an evening or
two before, and you will get quite used to it, whatever it is. Henry, do you
remember my white satin gown, which I scarcely wore a dozen times,
because it seemed too grand for Riseborough? It was too, I am sure: you
were quite right. It has been in camphor ever since. I used to wear my
Roman pearls with it. There are three rows, and the clasp is of real pearls.
The very thing for Cleopatra.”
“I recollect perfectly,” said Mr. Altham. His mind instantly darted off
again to the undoubted fact that whereas Major Ames was stout, he himself
was very thin. If he had been obliged to describe his figure at that moment,
he would have said it was boyish. The expense of a wig seemed of no
account.
“Well, my dear, white dress and pearls,” said his wife. “You are not very
encouraging. With that book of Egyptian antiquities, I can easily remodel
the dress. And I remember reading in a Roman history that Cleopatra was
well over thirty when Julius Cæsar was so devoted to her. And by the busts
he must have been much balder than you!”
It is no use denying that this was a rather heavy blow. Ever since the
mention of the word Cleopatra, he had seen himself complete, with a wig,
in another character.
“But Julius Cæsar was sixty,” he observed, with pardonable asperity. “I
do not see how I could make up as a man of sixty. And for that matter, my
dear, though I am sure no one would think you were within five years of
your actual age, I do not see how you could make up as a mere girl of thirty.
Why should we not go as ‘Antony and Cleopatra, ten years later’? It would
be better than to go as Julius Cæsar and Cleopatra ten years before!”
Mrs. Altham considered this. It was true that she would find it difficult to
look thirty, however many Roman pearls she wore.
“I do not know that it is such a bad idea of yours, Henry,” she said.
“Certainly there is no one in the world who cares about her age, or wants to
conceal it, less than I. And there is something original about your
suggestion—Antony and Cleopatra ten years later—Ah, there is the bell,
that will be Mrs. Brooks coming in. And there is the telephone also. Upon
my word, we never have a moment to ourselves. I should not wonder if half
Riseborough came to see us to-night. Will you go to the telephone and tell it
we are at home? And not a word to anybody, Henry, as to what we are
thinking of going as. There will be our surprise, at any rate, however much
other people go talking about their dresses. If you are being rung up to ask
about your costume, say that you haven’t given it a thought yet.”
For the next week Mrs. Altham was thoroughly in her element. She had
something to conceal, and was in a delicious state of tension with the
superficial desire to disclose her own impersonation, and the deep-rooted
satisfaction of not doing so. To complete her happiness, the famous white
satin still fitted her, and she was nearly insane with curiosity to know what
Major and Mrs. Ames “were going to be,” and what the whole history of the
projected festivity was. In various other respects her natural interest in the
affairs of other people was satiated. Mrs. Turner was to be Mistress Page,
which was very suitable, as she was elderly and stout, and did not really in
the least resemble Miss Ellen Terry. Mr. Turner had selected Falstaff, and
could be recognized anywhere. Young Morton, with unwonted modesty, had
chosen the part of the Apothecary in Romeo and Juliet. Mrs. Taverner was
to be Queen Catherine, and—almost more joyous than all—she had
persuaded Mrs. Brooks not to attempt to impersonate Cleopatra. What Mrs.
Brooks’ feelings would be when it dawned on her, as it not inconceivably
might, that Mrs. Altham had seen in her a striking likeness to her
conception of Hermione, because she did not want there to be two
Cleopatras, did not particularly concern her. She had asked Mrs. Brooks to
dinner the day after the entertainment, and her acceptance would bury the
hatchet, if indeed there was such a thing as a hatchet about. Finally, she had
called on Mrs. Evans, who had vaguely talked about Midsummer Night’s
Dream. Mrs. Altham had taken that to be equivalent to the fact that she
would appear as Titania, and Mrs. Evans had distinctly intended that she
should so take it. Indeed, the idea had occurred to her, but not very vividly.
Her husband was going to be Timon of Athens. That, again, was quite
satisfactory: nobody knew at all distinctly who Timon of Athens was, and
nobody knew much about Dr. Evans, except that he was usually sent for in
the middle of something. Probably the same thing happened to Timon of
Athens.
Indeed, within a couple of hours of the reception of Mrs. Evans’
invitations, which all arrived simultaneously by the local evening post, a
spirit of demoniacal gaiety, not less fierce than that which inspired Mrs.
Altham, possessed the whole of those invited. Though it was gay, it was
certainly demoniacal, for a quite prodigious amount of ill-feeling was
mingled with it which from time to time threatened to wreck the
proceedings altogether. For instance, only two days after all the invitations
had been accepted, Mrs. Evans had issued a further intimation that there
was to be dancing, and that the evening would open at a quarter past ten
precisely with a quadrille in which it was requested that everybody would
take part. It is easy to picture the private consternation that presided over
that evening; how in one house, Mrs. Brooks having pushed her central
drawing-room table to one side, all alone and humming to herself, stepped
in perplexed and forgotten measures, and how next door Mrs. and Mr.
Altham violently wrangled over the order of the figures, and hummed
different tunes, to show each other, or pranced in different directions. For
here was the bitter affair: these pains had to be suffered in loneliness, for it
was clearly impossible to confess that the practice of quadrilles was so long
past that the memory of them had vanished altogether. But luckily (though
at the moment the suggestion caused a great deal of asperity in Mrs.
Altham’s mind) Mrs. Ames came to the rescue with the suggestion that as
many of them, no doubt, had forgotten the precise manner of quadrilles, she
proposed to hold a class at half-past four to-morrow afternoon, when they
would all run through a quadrille together.
“There! I thought as much!” said Mrs. Altham. “That means that neither
Major nor Mrs. Ames can remember how the quadrille goes, and we,
forsooth, must go and teach them. And she puts it that she is going to teach
us! I am sure she will never teach me: I shall not go near the house. I do not
require to be taught quadrilles by anybody, still less by Mrs. Ames. There is
no answer,” she added to Jane.
Mr. Altham fidgeted in his chair. Last night he had been quite sure he
was right, in points where he and his wife differed, and that the particular
“setting partners” which they had shown each other so often did not come
in the quadrille at all, but occurred in lancers, just before the ladies’ chain.
But she had insisted that both the setting to partners and ladies’ chain came
in quadrilles. This morning, however, he did not feel quite so certain about
it.
“You might send a note to Mrs. Ames,” he observed, “and tell her you
are not coming.”
“No answer was asked for,” said his wife excitedly. “She just said there
was to be a quadrille practice at half-past four. Let there be. I am sure I have
no objection, though I do think you might have thought of doing it first,
Henry.”
“But she will like to know how many to expect,” said Henry. “If it is to
be at half-past four, she must be prepared for tea. It is equivalent to a tea-
party, unless you suppose that the class will be over before five.”
During the night Mrs. Altham had pondered her view about the ladies’
chain. It would be an awful thing if Henry happened to be right, and if, on
the evening of the dance itself, she presented her hand for the ladies’ chain,
and no chain of any sort followed. She decided on a magnanimous course.
“Upon my word, I am not sure that I shall not go,” she said, “just to see
what Mrs. Ames’ idea of a quadrille is. I should not wonder if she mixed it
up with something quite different, which would be laughable. And after all,
we ought not to be so unkind, and if poor Mrs. Ames feels she will get into
difficulties over the quadrille, I am sure I shall be happy to help her out. No
doubt she has summoned us like this, so that she need not show that she
feels she wants to be helped. We will go, Henry, and I daresay I shall get out
of her what she means to dress up as! But pray remember to say that we, at
any rate, have not given a thought to our costumes yet. And on our way, we
may as well call in at Mr. Roland’s, for if I am to wear my three rows of
pearls, he must get me a few more, since I find there is a good deal of string
showing. I daresay that ordinary pearl beads would answer the purpose
perfectly. I have no intention of buying more of the real Roman pearls.
They belonged to my mother, and I should not like to add to them. And if
you will insist on having some red stone in your cap, to make a buckle for
the feather, I am sure you could not do better than get a piece of what he
called German ruby that is in his shop now. I do not suppose anybody in
Riseborough could tell it from real, and after all this is over, I would wear it
as a pendant for my pearls. If you wish, I will pay half of it, and it is but a
couple of pounds altogether.”
It did not seem a really handsome offer, but Henry had the sense to
accept it. He wanted a stone to buckle the feather in a rather coquettish cap
that they had decided to be suitable for Mark Antony, and did not really care
what happened to it after he had worn it on this occasion, since it was
unlikely that another similar occasion would arise. Deep in his mind had
been an idea of turning it into a solitaire, but he knew he would not have the
practical courage of this daring conception. It would want another setting,
also.
In other houses there were no fewer anticipatory triumphs and past
perplexities. There was also, in some cases, wild and secret intrigue. For
instance, a few evenings after, Mrs. Brooks next door, sorting out garments
in her wardrobe from which she might devise a costume that should remind
the beholder of Hermione, looked from her bedroom window, where her
quest was in progress, and saw a strange sight in the next garden. There was
a lady in white satin with pearls; there was a gentleman in Roman toga with
a feathered cap. The Roman gentleman was a dubious figure; the lady
indubitable. If ever there was an elderly Cleopatra, this was she.
Mrs. Brooks sat heavily down, after observing this sight. It certainly was
Cleopatra in the next garden: as certainly it was a snake in the grass. In a
moment her mind was made up. She saw why she had been discouraged
from being Cleopatra; the false Mrs. Altham had wanted to be Cleopatra
herself, without rival. But she would be Cleopatra too. Riseborough should
judge between the effectiveness of the two representations. Of course, every
one knew that Mrs. Altham had three rows of Roman pearls, which were
nothing but some sort of vitreous enamel. But Mrs. Brooks, as Riseborough
also knew, had five or six rows of real seed-pearls. It was impossible to
denigrer seed-pearls: they were pearls, though small, and did not pretend to
be anything different to what they were. But the Roman prefix, to any fair-
minded person, invalidated the word “pearls.” Besides, even as Cleopatra
without pearls, she would have been willing to back herself against Mrs.
Altham. Cleopatra ought to be tall, which she was. Also Cleopatra ought to
be beautiful, which neither was. And Mrs. Altham had urged her to go as
Hermione! Of course, she had to revise her toilet, but luckily it had
progressed no further than the sewing of white rosettes on to a pair of
slightly worn satin shoes, which were equally suitable for any of
Shakespeare’s heroines.
The week which had passed for Mr. and Mrs. Altham in a succession of
so pleasing excitements and anxieties, had not been without incident to Mrs.
Ames. When (by the same post that bore their invitations to the other
guests) the announcement of the fancy dress ball reached her, and she read
it out to her husband (even as Mrs. Altham had done) towards the end of
dinner, he expressed his feelings with a good deal of pooh-ing and the
opinion that he, at any rate, was past the years of dressing-up. This attitude
(for it had been settled that the invitation was to come as a surprise to him)
he somewhat overdid, and found to his dismay that his wife quite agreed
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com