Cambiata visualizzazione calendario e aggiunto formAttività
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Linq.Expressions;
|
||||
using SQLite;
|
||||
using SQLite;
|
||||
using System.Linq.Expressions;
|
||||
using Template.Shared.Core.Entity;
|
||||
|
||||
namespace Template.Maui.Core.Services;
|
||||
|
||||
public class LocalDbService
|
||||
@@ -13,7 +12,6 @@ public class LocalDbService
|
||||
{
|
||||
_connection = new SQLiteAsyncConnection(Path.Combine(FileSystem.AppDataDirectory, DB_NAME));
|
||||
|
||||
//Creazione tabelle database
|
||||
_connection.CreateTableAsync<AnagClie>();
|
||||
_connection.CreateTableAsync<JtbComt>();
|
||||
_connection.CreateTableAsync<PtbPros>();
|
||||
@@ -52,9 +50,24 @@ public class LocalDbService
|
||||
}
|
||||
}
|
||||
|
||||
public Task Insert<T>(List<T> entityList) =>
|
||||
public Task InsertAll<T>(List<T> entityList) =>
|
||||
_connection.InsertAllAsync(entityList, typeof(T));
|
||||
|
||||
public async Task Insert<T>(List<T> entityList)
|
||||
{
|
||||
foreach (var entity in entityList)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _connection.InsertAsync(entity, typeof(T));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Errore db su {entity}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task InsertOrUpdate<T>(List<T> entityList)
|
||||
{
|
||||
foreach (var entity in entityList)
|
||||
|
||||
Reference in New Issue
Block a user