mirror of
https://github.com/dotnet/skills.git
synced 2026-09-20 09:49:54 +08:00
19 lines
440 B
C#
19 lines
440 B
C#
using BusinessLogic;
|
|
|
|
namespace WebApi;
|
|
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var service = new EntityService();
|
|
|
|
var result = service.CreateEntity("Test Entity");
|
|
if (result.Success)
|
|
Console.WriteLine($"Created: {result.Data!.Name} (ID: {result.Data.Id})");
|
|
|
|
var all = service.ListEntities();
|
|
Console.WriteLine($"Total entities: {all.Count}");
|
|
}
|
|
}
|