Innovenergy_trunk/csharp/App/Backend/Database/Create.cs

60 lines
1.5 KiB
C#

using InnovEnergy.App.Backend.DataTypes;
using InnovEnergy.App.Backend.Relations;
namespace InnovEnergy.App.Backend.Database;
public static partial class Db
{
public static Boolean Create(Installation installation)
{
// SQLite wrapper is smart and *modifies* t's Id to the one generated (autoincrement) by the insertion
return Connection.Insert(installation) > 0;
}
public static Boolean Create(DeletedInstallation installation)
{
return Connection.Insert(installation) > 0;
}
public static Boolean Create(Folder folder)
{
return Connection.Insert(folder) > 0;
}
public static Boolean Create(DeletedFolder folder)
{
return Connection.Insert(folder) > 0;
}
public static Boolean Create(User user)
{
return Connection.Insert(user) > 0;
}
public static Boolean Create(DeletedUser user)
{
return Connection.Insert(user) > 0;
}
public static Boolean Create(Session session)
{
return Connection.Insert(session) > 0;
}
public static Boolean Create(InstallationAccess installationAccess)
{
return Connection.Insert(installationAccess) > 0;
}
public static Boolean Create(FolderAccess folderAccess)
{
return Connection.Insert(folderAccess) > 0;
}
public static Boolean Create(OrderNumber2Installation o2i)
{
return Connection.Insert(o2i) > 0;
}
}