//
        // GET: /Friendship/Create
        public ActionResult Create(string user)
        {
            @ViewBag.user = user;

            if (((db.Friendships.Where(c => c.UserName1.Equals(@User.Identity.Name) && c.UserName2.Equals(user))).Count() > 0)
                || ((db.Friendships.Where(c => c.UserName2.Equals(@User.Identity.Name) && c.UserName1.Equals(user))).Count() > 0))
            {
                @ViewBag.friendshiperror = "<div class='error-msg'>You are already friend with this person</div>";
                return View();
            }
            else
            {
                if (user.Equals(@User.Identity.Name))
                {
                    @ViewBag.friendshiperror = "<div class='error-msg'>You cannot request to be friend with yourself, I guess you are already your friends</div>";
                    return View();

                }
                else
                {
                    var model = new MvcWeb1.Models.Friendship
                    //var m = new MvcWeb1.Models.User
                    {
                        UserName1 = @User.Identity.Name,
                        DateAdded = System.DateTime.Now,
                        UserName2 = user,
                        Status1 = 1,
                        Status2 = 0
                    };

                    return View(model);
                }
            }
        }
 // GET: /User/RequestFreindship
 public ActionResult RequestFreindship(string user)
 {
     var model = new MvcWeb1.Models.Friendship
     //var m = new MvcWeb1.Models.User
     {
         UserName1 = @User.Identity.Name,
         DateAdded = System.DateTime.Now,
         UserName2 = user,
         Status1 = 1,
         Status2 = 0
     };
     return View(model);
 }