Resolved new DOB().U().O

jack

New member
Joined
Oct 21, 2021
Messages
1
Programming Experience
Beginner
I am new at this language I want to see what is relation between all 3 (DOB , U , O).
However actual question I Encounter is below.

C#:
new DbContextOptionsBuilder<AppDbContext>()

            .UseInMemoryDatabase(databaseName: "BookDbTest")

            .Options;


I Know DbContextOptionsBuilder() is constructor.

But what is meaning Constructor.UseInMemoryDatabase() --> what it is calling Method,... ?
What actually it is calling after dot

What is the Whole Meaning of Sentence?
 
Last edited:
Looks like an Entity Framework question...
 
Line 1 creates an object.
Line 3 calls a method on the object; OR uses an extension method passing in the object was created on line 1. Either way an object is returned.
Line 5 accesses a property on the object returned on line 3.

The code above could have been written as:
C#:
var obj1 = new DbContextOptionsBuilder<AppDbContext>();
var obj2 = obj1.UseInMemoryDatabase(databaseName: "BookDbTest");
obj2.Options;
 
Back
Top Bottom