killoaz.blogg.se

Turn off comments facebook wall
Turn off comments facebook wall










turn off comments facebook wall turn off comments facebook wall

Var ret = (from post in db.Posts.ToList() Private WallEntities db = new WallEntities() Private string defaultAvatar = "user.png" Private string imgFolder = "/Images/profileimages/" Public class WallPostController : ApiController In WallPostController, we modify Get and Post method as below: Similarly Add apicontroller for “PostComments” model and give name “ CommentController“. Right Click on Controllers folder > Add > ControllerĮnter Name “ WallPostController” > Select Template “API Controller with Read/Write Actions …”, Select Model (Post) and Data Context Class > Add Install-Package knockoutjs Web API Controllers:

#Turn off comments facebook wall install

Make Sure Knockout is already there, if not, install it from Nuget by running the following command in the Package Manager Console Download and add jQuery timeago plugin in Scripts folder.ĥ. It is used to enable automatic height for textarea elements.Ĥ. Download and add jQuery AutoSize plugin in Scripts folder. In Models, Add new item “ADO.Net Entity Data Model”, Select “Generate From Database”, Select Database and Tables, Enter entity and model names.ģ.

turn off comments facebook wall

Create ASP.NET MVC 4 > Internet Application Project in VS2012.Ģ. Other tables(not displayed in the image, common tables) are used to implement SimpleMembershipProvider. Post table is used for Wall posts and PostComment table is used for comments. In UserProfile table, AvatarExt is used to store extension of user thumbnail and it is stored in the application with UserId +. The edmx view generated from database is as follows:












Turn off comments facebook wall