mhf-server/Mhf.Server/Database/IDatabase.cs
2019-11-24 19:43:35 +08:00

23 lines
601 B
C#

using System.Collections.Generic;
using Mhf.Server.Model;
namespace Mhf.Server.Database
{
public interface IDatabase
{
void Execute(string sql);
/// <summary>
/// Return true if database was created, or false if not.
/// </summary>
bool CreateDatabase();
// Account
Account CreateAccount(string name, string mail, string hash);
Account SelectAccountById(int accountId);
Account SelectAccountByName(string accountName);
bool UpdateAccount(Account account);
bool DeleteAccount(int accountId);
}
}