// if any error db will return 1 internal bool SendMessage(Message message) { command = database.GetStoredProcCommand("sp_SendMessage"); database.AddInParameter(command, "@UserId", SqlDbType.NVarChar, message.SenderId); database.AddInParameter(command, "@RecieverId", SqlDbType.NVarChar, message.ReceiverId); database.AddInParameter(command, "@MessageContent", SqlDbType.NVarChar, message.Text); try { database.ExecuteNonQuery(command); return true; } catch { return false; } }
public static bool SendMessage(Message message) { return mMessageLogic.SendMessage(message); }
public bool SendMessage(Message message) { return Message.SendMessage(message); }