Example #1
0
        public FriendRequest IsFriendRequestExist(string username, string friendUId)
        {
            FriendRequest friendRequest   = null;
            DataTable     dtFriendRequest = _dbManager.IsFriendRequestExist(username, friendUId);

            friendRequest = (from row in dtFriendRequest.AsEnumerable()
                             select new FriendRequest()
            {
                Id = Convert.ToInt64(row["Id"]),
                SenderId = Convert.ToString(row["SenderId"]),
                RecipientId = Convert.ToString(row["RecipientId"]),
                Status = (FriendRequestStatus)Convert.ToInt32(row["Status"]),
            }).SingleOrDefault();

            return(friendRequest);
        }
Example #2
0
 public bool UpsertFriendRequest(FriendRequest friendRequest)
 {
     return(_dbManager.UpsertFriendRequest(friendRequest.SenderId, friendRequest.RecipientId, friendRequest.Status));
 }
Example #3
0
 public bool DeleteFriendRequest(FriendRequest friendRequest)
 {
     return(_dbManager.DeleteFriendRequest(friendRequest.SenderId, friendRequest.RecipientId));
 }