Browse Source

zwischenstand

Felix
Naumann 2 years ago
parent
commit
bd4f034d7b
  1. 6
      Controllers/LendController.cs
  2. BIN
      LongWormMemory.db
  3. 2
      Models/KatalogModel.cs
  4. 2
      Models/LendModel.cs

6
Controllers/LendController.cs

@ -68,12 +68,12 @@ namespace BuecherwurmAPI.Controllers
return Ok(lend);
}
//PATCH api/leihvorgang/{id}
//PUT api/leihvorgang/{id}
[HttpPut("{id}")]
public ActionResult LendPatchById(long id, LendPost lend)
{
_repository.insertLendReturningId(id, lend);
return Ok();
var lendPatch = _repository.insertLendReturningId(id, lend);
return Ok(lendPatch);
}
}
}

BIN
LongWormMemory.db

Binary file not shown.

2
Models/KatalogModel.cs

@ -149,7 +149,7 @@ namespace BuecherwurmAPI.Models
command.Parameters.Add(new SqliteParameter("@LendTime", book.LendTime));
command.Parameters.Add(new SqliteParameter("@LendType", book.LendType));
var success = command.ExecuteNonQuery();
command.ExecuteNonQuery();
return id;
}

2
Models/LendModel.cs

@ -118,10 +118,12 @@ namespace BuecherwurmAPI.Models
if (success == 1)
{
command.CommandText = @"SELECT last_insert_rowid()";
return (long)command.ExecuteScalar();
}
return -1;
}
}

Loading…
Cancel
Save