我有以下域层。对于简单的库存程序,它只是一些简单的对象。我需要创建一个服务层,允许我编辑Domain层中的对象,但是由于我是C#的新手,我不得不弄清楚如何做到这一点。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HomeInventory2.Domain
{
[Serializable]
public class EditInventory
{
/// <summary>
/// item category
/// </summary>
private string itemCategory;
public String ItemCategory
{
set
{
itemCategory = value;
}
get
{
return itemCategory;
}
}
/// <summary>
/// item properties
/// </summary>
private string itemProperties;
public String ItemProperties
{
set
{
itemProperties = value;
}
get
{
return itemProperties;
}
}
/// <summary>
/// item amount
/// </summary>
private string itemAmount;
public String ItemAmount
{
set
{
itemAmount = value;
}
get
{
return itemAmount;
}
}
/// <summary>
/// item value
/// </summary>
private string itemValue;
public String ItemValue
{
set
{
itemValue = value;
}
get
{
return itemValue;
}
}
}
}