Esempio n. 1
0
        public PrimitiveResponse InviteToAnswer(UserInvitedDto model)
        {
            PrimitiveResponse primitiveResult = null;
            var prms = new Dictionary <string, SqlParam>();

            prms.Add("@Id", new SqlParam()
            {
                Direction = System.Data.ParameterDirection.Input, SqlType = System.Data.SqlDbType.Int, Value = model.Id
            });
            prms.Add("@FriendshipStatus", new SqlParam()
            {
                Direction = System.Data.ParameterDirection.Input, SqlType = System.Data.SqlDbType.Int, Value = model.FriendshipStatus
            });
            var result = _baseService.ExecuteNonQuery("sp_InviteToAcceptOrReject", prms);

            primitiveResult = new PrimitiveResponse()
            {
                ResponseCode = ResponseCodes.Successful, ResponseMessage = "Insert successfully."
            };
            return(primitiveResult);
        }
Esempio n. 2
0
        public HttpResponseMessage InviteToAnswer(UserInvitedDto model)
        {
            var result = _friendsService.InviteToAnswer(model);

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }