//insert in to bookmark public int AddUserBookmark(UserBookmarkModel model) { int cost = 0; try { using (TransactionScope trScope = new TransactionScope()) { using (SqlConnection con = new SqlConnection(CONNECTION_STRING)) { con.Open(); SqlCommand command = new SqlCommand("Insert_User_BookMark", con); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@User_Id", model.UserId); command.Parameters.AddWithValue("@BookMarkName", model.BookMarkName); command.Parameters.AddWithValue("@BookMarkTime", model.BookMarkTime); command.Parameters.AddWithValue("@TalkId", model.TalkId); cost = Convert.ToInt32(command.ExecuteScalar()); } trScope.Complete(); } } catch { throw; } return(cost); }
public int AddUserBookmark(UserBookmarkModel model) { int result = 0; try { result = _businessLayer.AddUserBookmark(model); } catch (Exception ex) { throw; } return(result); }