3
Answers

How to Integrate facebook plugins in my website

Khargesh Rajput

Khargesh Rajput

11y
1.1k
1
I want to add  like and comment button in my asp.net website.
Answers (3)
0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
Hi,
  The difference between the UserTable.cs and UserInfo.cs, if you used Entity Framework, then UserTable.cs (Same table is exist in DB) will not able to modify. It will contain all the columns of the DB. So if you don't want all the columns and if you like some extra column then you can have UserInfo.cs
Ex. In the DB UserTable contain following fileds 
 - UserId
 - FirstName
 - LastName
 - Street
 - City
 - State
 - Country
 - Status
Now if you want in your application then you can have UserInfo.cs as 
- UserId
- Name
- Address
- Status
So it is upto you to have one more DataModel of your type in MVC

Regards,
Iftikar

0
Jignesh Trivedi

Jignesh Trivedi

NA 61k 14.2m 11y

hi,

Are you work with multi tier application previously?
here also it work similarly. MVC work as presention tire and you may add other n -tire ..

Please refer
http://www.codeproject.com/Articles/70061/Architecture-Guide-ASP-NET-MVC-Framework-N-tier-En
http://www.cmjackson.net/2010/01/18/mvc-and-n-layer-architecture/

hope this will help you.

0
r p

r p

NA 341 0 11y
I assume there is a table in the database called UserInfo and UserInfo.cs is the model of that table.
What is the role of UserTable.cs?
UserInforBusinessLayer.cs - hope this should be calling the functions in UserInfoDataAccess.cs?UserInfoDataAccess.cs should be using UserInfo.cs?

0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
Hi,
  You can have project as shown below
DataModel - Put all your model class in this project (only for the BusinessLayer)

DataAccess - Put all your data access layer classes over here. In this layer you will just get data from your DB thru either EF or ADO.NET or classing way and use only the data model which is just the replica of your DB table.

BusinessLayer - Here you can put all your business layer classes, in this you will call DataAccess classes and format your BusinessLayer by using Business Data Model

For Ex.
I want to reterive user information from DB
EmpDataModel
        - UserInfo.cs
EmpDataAccess
        - UserInfoDataAccess.cs
        - UserTable.cs
EmpBusinessLayer
        - UserInforBusinessLayer.cs (will be using UserInfo.cs)
MainWebProject
        - Cotroller - will call EmpBusinessLayer
        - Views
        - And other folder like Images, Script etc. (but will not contain Model)

Regards,
Iftikar