|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
using SharedEF;
|
|
|
|
|
using Model;
|
|
|
|
|
using Model.Repository;
|
|
|
|
|
using Shared;
|
|
|
|
|
|
|
|
|
|
namespace Model2Entities;
|
|
|
|
|
|
|
|
|
@ -13,42 +15,28 @@ public partial class DbDataManager
|
|
|
|
|
_dataManager = dataManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<IEnumerable<Activity>> GetItems(int index, int count, Enum? orderingProperty = null, bool descending = false)
|
|
|
|
|
|
|
|
|
|
public async Task<IEnumerable<Activity>> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false)
|
|
|
|
|
{
|
|
|
|
|
// public class MyLogger
|
|
|
|
|
// {
|
|
|
|
|
// public void Log(string component, string message)
|
|
|
|
|
// {
|
|
|
|
|
// Console.WriteLine("Component: {0} Message: {1} ", component, message);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// ? Utilisation du logger !!!
|
|
|
|
|
//! using (var context = new LibraryContext())
|
|
|
|
|
//! {
|
|
|
|
|
// var logger = new MyLogger();
|
|
|
|
|
// context.Database.Log = s => logger.Log("EFApp", s);
|
|
|
|
|
//! // log la connexion à la base de donnée
|
|
|
|
|
//! context.Database.Log = Console.Write;
|
|
|
|
|
//! }
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Activity> GetItemById(int id)
|
|
|
|
|
public async Task<Activity?> GetActivityByIdAsync(int id)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Activity> UpdateItem(int oldItem, Activity newItem)
|
|
|
|
|
public async Task<Activity?> AddActivity(Activity activity)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Activity> AddItem(Activity item)
|
|
|
|
|
public async Task<Activity?> UpdateActivity(int id, Activity activity)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<bool> DeleteItem(Activity item)
|
|
|
|
|
public async Task<bool> DeleteActivity(int id)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|