public async Task <HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); string retour = ""; try { retour = new SocieteDAO(sqlManager).GetAllSociete(); } catch (Exception e) { return(new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError) { Content = new StringContent(e.Message) }); } return(new HttpResponseMessage(System.Net.HttpStatusCode.OK) { Content = new StringContent(retour) }); }
public static List <Societe> List(string query) { try { return(SocieteDAO.getList(query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public static Societe OneById(int id) { try { return(SocieteDAO.getOneById(id)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public static Societe OneByName(string name) { try { return(SocieteDAO.getOneByName(name)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public static bool Update(Societe bean) { try { return(SocieteDAO.getUpdate(bean)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public static Societe ReturnSociete() { try { return(SocieteDAO.ReturnSociete()); } catch (Exception ex) { throw new Exception("Echec de Création de fichier", ex); } }
public static bool CreateSociete(Societe uneConfig) { try { return(SocieteDAO.CreateSociete(uneConfig)); } catch (Exception ex) { throw new Exception("Echec de Création de fichier", ex); } }