public async Task <ActionResult> Createssignment(string Nombre) { try { var assign = new EntAssignment() { Nombre = Nombre, }; var result = await _ibusAssignment.SaveAssignment(assign); if (result) { return(Ok("Operacion Exitosa")); } else { return(NotFound("No se grabo estudiante")); } } catch (Exception ex) { return(NotFound(ex.ToString())); } }
public async Task <bool> SaveAssignment(EntAssignment entAssignment) { try { var asignacione = new Asignacione() { Nombre = entAssignment.Nombre }; _schoolContext.Asignaciones.Add(asignacione); await _schoolContext.SaveChangesAsync(); return(true); } catch (Exception ex) { throw new Exception("Erro " + ex.Message); } return(false); }
public async Task <bool> DeleteAssignment(EntAssignment entAssignment) { throw new System.NotImplementedException(); }
public async Task <bool> SaveAssignment(EntAssignment entAssignment) { return(await new DatAssignment(_schoolContext).SaveAssignment(entAssignment)); }
public async Task <bool> UpdateAssignment(EntAssignment entAssignment) { throw new NotImplementedException(); }