我的实体类接口

    技术2026-01-06  7

    1.为什么使用实体类接口?

       对于实体类,通常的操作都是“增、删、改、查”,因此考虑将它们抽象成接口,既方便命名,也方便Client的使用;

    2.代码

    using System; using System.Collections.Generic; using System.Text; using System.Data; namespace BL { public interface IEntityStore { bool Save(); bool Delete(int intId); DataTable GetById(); DataTable GetAll(); } }

    最新回复(0)