The app that will change your life

I absolutely have to share something with you because I’m sure I’m not the only one in this situation, and I know my discovery is going to help some of you. It all started with a click. After many…


独家优惠奖金 100% 高达 1 BTC + 180 免费旋转

Project A

Purpose — to create a beauty website that can take save customer details and enquiries

Step 1

Creating a Customer Class with the enquiry details and notes

I decided to add the access modifier ‘sealed’ to this class because I do not want any of my other classes to be able to inherit from this class. I also added a constructer with the needed values to set the properties when a new instance of this class is created.

Step 2

Create a Context Class that inherits from the Context class using Code First approach to create a the Entity model for how I would like the Db to be organised.

The DataBase is organised as a set of Enquiries with the Key EnquiryID. I also added ‘sealed’ here so that it can not be inherited by any other class. At this point it is not connected to any Db. At this point, I need to configure the application to a DB when it is build.

Step 3

Use the appropriate approach to config the Db with the application

I added the Configuration using the Dependency Injection approach allows the code to more test friendly. By changing the connection string I am able to test the data without doing a lot of work to create a test double.

Step 4

Modify the appsettings.Json file to include the connection string in order for the application to get the required info to access and create the Db

By modifying the Json file and added this connectionString when the application is ran it should be able to connect to my local server to create a Db called ‘BeautyEnquiriesDb’

Problem — my database has not been created

Solved! My database was not able to be created because SQLite did not operate like other SQL as it is file based. SQL is a query language which is used by different SQL Db whereas SQL is a data management system itself which uses SQL.

By changing the SQL I was able to create the DB in my local server however my testability has suffered. Moving forward I’m going to be using SQLite for me to understand and learn the limitations and advantages.

Add a comment

Related posts:

best auto loan rates oklahoma

best auto loan rates oklahoma. “best auto loan rates oklahoma” is published by Ulezl.

Install Drupal 8 on Windows 10

Drupal is a free open-source cms for web development. It’s written in PHP and has unlimited abilities. It’s not only fantastic for developers, but it is also fairly easy to start your first site…

Empathizing Just Got Easier

When I started watching Ross and Matt Duffer’s Stranger Things, one episode resonated with me. There’s a scene in “Chapter 4: The Body” where Will (played by Noah Schnapp), the missing boy trapped in…