2023-03-15 13:38:06 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2023-03-23 11:47:25 +00:00
|
|
|
public static Boolean Create(DeletedInstallation installation)
|
|
|
|
{
|
|
|
|
return Connection.Insert(installation) > 0;
|
|
|
|
}
|
|
|
|
|
2023-03-15 13:38:06 +00:00
|
|
|
public static Boolean Create(Folder folder)
|
|
|
|
{
|
|
|
|
return Connection.Insert(folder) > 0;
|
|
|
|
}
|
|
|
|
|
2023-03-23 11:47:25 +00:00
|
|
|
public static Boolean Create(DeletedFolder folder)
|
|
|
|
{
|
|
|
|
return Connection.Insert(folder) > 0;
|
|
|
|
}
|
|
|
|
|
2023-03-15 13:38:06 +00:00
|
|
|
public static Boolean Create(User user)
|
|
|
|
{
|
|
|
|
return Connection.Insert(user) > 0;
|
|
|
|
}
|
2023-03-23 11:47:25 +00:00
|
|
|
|
|
|
|
public static Boolean Create(DeletedUser user)
|
|
|
|
{
|
|
|
|
return Connection.Insert(user) > 0;
|
|
|
|
}
|
2023-03-15 13:38:06 +00:00
|
|
|
|
|
|
|
public static Boolean Create(Session session)
|
|
|
|
{
|
|
|
|
return Connection.Insert(session) > 0;
|
|
|
|
}
|
|
|
|
|
2023-03-16 08:25:36 +00:00
|
|
|
public static Boolean Create(InstallationAccess installationAccess)
|
2023-03-16 08:15:59 +00:00
|
|
|
{
|
2023-03-16 08:25:36 +00:00
|
|
|
return Connection.Insert(installationAccess) > 0;
|
2023-03-16 08:15:59 +00:00
|
|
|
}
|
|
|
|
|
2023-03-16 08:25:36 +00:00
|
|
|
public static Boolean Create(FolderAccess folderAccess)
|
2023-03-16 08:15:59 +00:00
|
|
|
{
|
2023-03-16 08:25:36 +00:00
|
|
|
return Connection.Insert(folderAccess) > 0;
|
2023-03-16 08:15:59 +00:00
|
|
|
}
|
2023-03-23 13:58:59 +00:00
|
|
|
|
|
|
|
public static Boolean Create(OrderNumber2Installation o2i)
|
|
|
|
{
|
|
|
|
return Connection.Insert(o2i) > 0;
|
|
|
|
}
|
2023-03-15 13:38:06 +00:00
|
|
|
}
|