ワンクリックで
servicestack-ormlite-usage
Uses OrmLite via the implicit Db connection and understands transaction semantics and rollback behavior.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Uses OrmLite via the implicit Db connection and understands transaction semantics and rollback behavior.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Designs stable, discoverable APIs using routes, metadata, and versioning conventions.
Implements authentication using ServiceStack Auth Providers and session handling.
Applies role-, permission-, and ownership-based authorization using ServiceStack idioms.
Implements AutoQuery services, custom filters, and permission-aware querying.
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
Controls OpenAPI / metadata exposure without compromising ServiceStack-first design.
| name | servicestack-ormlite-usage |
| description | Uses OrmLite via the implicit Db connection and understands transaction semantics and rollback behavior. |
OrmLite is a lightweight Micro-ORM that maps POCOs to database tables.
[Alias], [PrimaryKey], [AutoIncrement], [Index], [Required], [StringLength].[Reference] for relationships (one-to-one, one-to-many).public class Customer
{
[AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
}
Db ConnectionIn a Service class, the Db property is automatically available and managed.
Db.Select<Customer>(), Db.SingleById<Customer>(1), Db.LoadSelect<Customer>(c => c.Name.StartsWith("A")).Db.Insert(new Customer { ... }), Db.Update(customer), Db.DeleteById<Customer>(1).using blocks for transactions.using var trans = Db.OpenTransaction();
try {
Db.Insert(obj1);
Db.Insert(obj2);
trans.Commit();
} catch (Exception) {
// trans.Rollback() is called implicitly on Dispose if Commit() wasn't called
throw;
}
[IgnoreDataMember] or discrete DTOs if necessary.[Alias] is used). Match your POCO property names to DB column names.Async variants (e.g., Db.SelectAsync, Db.InsertAsync) in high-concurrency environments.