コード例 #1
0
        public IActionResult PostMatrix([FromBody] LsaPayload payload)
        {
            _logger.Log(LogLevel.Information, "Creating LSA");
            LatentSemanticAnalysis lsa = new LatentSemanticAnalysis(payload);

            _logger.Log(LogLevel.Information, "Saving new LSA");
            _lsaService.Create(lsa);
            _logger.Log(LogLevel.Information, String.Format("Created LSA with id: {0}", lsa.Id));

            return(CreatedAtRoute("GetLsa", new { id = lsa.Id.ToString() }, lsa));
        }
コード例 #2
0
ファイル: LsaService.cs プロジェクト: CooperFLe/SealedCloud
 public void Update(string id, LatentSemanticAnalysis lsaIn) =>
 _lsas.ReplaceOne(lsa => lsa.Id == id, lsaIn);
コード例 #3
0
ファイル: LsaService.cs プロジェクト: CooperFLe/SealedCloud
 public void Remove(LatentSemanticAnalysis lsaIn) =>
 _lsas.DeleteOne(lsa => lsa.Id == lsaIn.Id);
コード例 #4
0
ファイル: LsaService.cs プロジェクト: CooperFLe/SealedCloud
 public LatentSemanticAnalysis Create(LatentSemanticAnalysis lsa)
 {
     _lsas.InsertOne(lsa);
     return(lsa);
 }