So let's get started with our assignment and get to that super quick, first thing, we need to create
a model.
Let's do that.
This will be company model, whether it make this a public place, and we want all the properties,
which is.
Name, street address, city state postal code and phone number the one at the bottom, we have marked
them as label and name is the required property.
It will be the primary key by default.
So our model looks good.
Let's add that in the DB context we can add to be our on company and their contact companies, and we
will have the getter and center.
Once we add that in, our DP said we can add migration.
I recall this ad company DP.
And let's add that.
Look scared.
Let's update the database here.
And perfect, then we need to work on the repository for our company.
So let's go to our repository, a repository.
I have a copy cover tape pasted here for our company.
We will have to make some changes to the interface.
Let me do that.
This will be on company.
And we want to update a comfortable object, looks good.
Let's copy the color type.
They start again for the implementation this time.
We have company repository that will copy the name and at that.
Make sure you are working on the company repository where they change the classroom and update everything
in this repository.
Let me deal with that.
Perfect.
That looks good for the repository that will copy the interface name here and go to our unit of work
will implement a company repository called That Company.
We will have to get there.
Let's do the unit at work here.
The public eye company.
And initialize our company as a new cultural repository and perfect with that, we have can't figure
it out for it.
Let's go back to the presentation.
The last thing is to perform operations on company using data tables.
So that will be similar to what we did with menu items.
So I mean, we have controller same thing that we did with product.
So let me copy the product controller here it and I will call this as company controller.
Let me modify everything inside there to be company.
We do not need the Web hosting that because we are not working with the files.
So let's remove that.
And we do not even need a new model, so we can just work with a basic company object.
Let's do that.
Then insert absurd if it is now we can just return back company here, and if the idea is populated
with a load, are comfortable.
To The View, we return back the company motto, so an absurd cat looks good.
Let me remove the comments here.
Let's work on the abstract post here.
We work, receive a comfortable object.
We do not have to work with files so we can remove all of that.
We will check a fair bit of it is equally equal to zero.
That means we have to add a company or else we have to update that company.
That's correct this time data.
Half have the company created and updated.
That looks good.
Let's also modify the API calls for our data table this time.
We want to talk about the company.
We do not have any enclosed properties.
We're going to call this company list and let me finish that here.
That looks good on lead.
We will be working with company so that they modify that.
We do not have any image here, but we just have companies that remove OPG.
So perfect.
Our company controller looks good.
Next to what we have to work on is the views.
So if we go back to Atman, we have the views for product.
Let's copy and paste them one more time where they change the folder name as company to match with our
controller's name.
Think it's that comfortable that we open up the index and absurd and inside W WW Road we where we've
copied the product as they stood here for our company?
Yes.
Let's open that as well.
These are the three files that we need to fix now.
Let me modify everything here to be company again.
It will be create a new company controller will be a company controller looks good.
Next is to display the properties that are related to company.
So I will add those to each element for name, address, city, state and phone number.
Let's modify the absurd.
We won't be working with your model.
We directly have the company model.
Then we will need the IED inside hidden property.
We're not going to emerge here.
We'll just be using Model I.D..
Where will display company here next, we need to modify the properties based on company so that we
do that.
Let me remove everything else that we have here.
I just keep this separate button.
First thing here will be the name of the company.
Let me copy and paste it here.
Then let me copy and paste this about four more times.
So after name, let's have a phone number for the company.
And then we can work on the actress.
So perfect, we have phone number, address, city, state and postal code.
Then if the idea is not zero, we want to update and we want to create here.
We do not want any custom function for our controller.
The name of the company ActionScript Index.
We do not need any image.
We can't remove that.
Let's scroll down.
We cannot hope that tiny mercy, all the custom function, we can't remove that script.
That looks good for the absurd method.
You can clean this up if you want.
But the absurd looks good.
Let's go on index right here in the U.S. when the company docked.
Yes, let's go here.
We don't have.
We have name, street address, city, state and phone number.
So if you get the error rate data table, make sure to find out what is returned from the JASON.
And I'm pretty sure it will just be a casing mistake or a spelling mistake inside the data properties.
Thank you.
Whatever the admin company get.
Oh.
That's the carpet, this company that will be for absurd and delayed as well.
Let's scroll down.
Yep.
Everything else looks good.
Lastly, we need to update our underscored lay out.
And instead, the content management that will copy one and tag posted here from the company controller.
Well, combat as comfortable with that, let me run outside of the ocean, and I believe everything
should be done.
So let's go to content management, we have company.
Let's create a new company.
Populate the details and hit the reset button and perfect all the credit operations should also work
if I change that.
Let me add a fake company here and try to delete that whole perfect.
I will create two companies here, and that should be sufficient.
With that, let's get back to our identity.