コード例 #1
0
 public int Ajouter(CategorieComposant model)
 {
     try
     {
         return(Gestion.Ajouter(model.Nom));
     }
     catch (Exception e)
     {
         throw new Exception("Impossible d'ajouter la catégorie : \n" + e.Message);
     }
 }
コード例 #2
0
 public int Modifier(CategorieComposant model)
 {
     try
     {
         return(Gestion.Modifier(model.Id, model.Nom));
     }
     catch (Exception e)
     {
         throw new Exception($"Impossible de modifier la catégorie {model.Id} : \n" + e.Message);
     }
 }
コード例 #3
0
        public AccesCategorieComposant(string sChaineConnexion) : base(sChaineConnexion)
        {
            Table = "CategorieComposant";

            _classesBase = new CategorieComposant();
        }
コード例 #4
0
 public async Task <int> AjouterAsync(CategorieComposant model)
 {
     return(await Task.Run(() => Ajouter(model)));
 }