public async Task <string> Post([FromBody] StudentEntity student) { try{ await _studentRepo.CreateNewStudent(student); return("S-a adaugat cu succes"); } catch (System.Exception e) { return("Eroare " + e.Message); throw; } }
public async Task <string> Post([FromBody] StudentEntity student) { try{ await _studentRepo.CreateNewStudent(student); return("S-a adaugat cu succes"); } catch (System.Exception e) { return("Eroare " + e.Message); throw; } }