Skip to content

Commit 65bef06

Browse files
committed
implemented Save method on prompt store
1 parent f7522ba commit 65bef06

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DotPrompt.Sql/SqlPromptStore.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public IEnumerable<PromptFile> Load()
2727
/// <param name="name">The name of the file</param>
2828
public void Save(PromptFile promptFile, string? name)
2929
{
30-
throw new NotImplementedException();
30+
var saver = new SqlPromptLoader(repository);
31+
var entity = SqlPromptEntity.FromPromptFile(_promptFile);
32+
var added = entity != null && saver.AddSqlPrompt(entity).GetAwaiter().GetResult();
3133
}
3234

3335
/// <summary>

0 commit comments

Comments
 (0)