⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderdaostub.cs

📁 NHibernate简单DEMO
💻 CS
字号:
using System;
using System.Collections.Generic;
using BasicSample.Core.DataInterfaces;
using BasicSample.Core.Domain;
using BasicSample.Tests.TestFactories;

namespace BasicSample.Tests.Data.DaoTestDoubles
{
    /// <summary>
    /// Stub DAO that can be used in place of OrderDao to simulate communications with 
    /// the DB without actually talking to the DB.
    /// </summary>
    public class OrderDaoStub : IOrderDao
    {
        public List<Order> GetByExample(Order exampleInstance, params string[] propertiesToExclude) {
            return new TestOrdersFactory().CreateOrders();
        }

        #region Not-Implemented DAO methods

        public List<Order> GetOrdersPlacedBetween(DateTime startDate, DateTime endDate) {
            throw new Exception("The method or operation is not implemented.");
        }

        public Order GetById(long id, bool shouldLock) {
            throw new Exception("The method or operation is not implemented.");
        }

        public List<Order> GetAll() {
            throw new Exception("The method or operation is not implemented.");
        }

        public Order GetUniqueByExample(Order exampleInstance, params string[] propertiesToExclude) {
            throw new Exception("The method or operation is not implemented.");
        }

        public Order Save(Order entity) {
            throw new Exception("The method or operation is not implemented.");
        }

        public Order SaveOrUpdate(Order entity) {
            throw new Exception("The method or operation is not implemented.");
        }

        public void Delete(Order entity) {
            throw new Exception("The method or operation is not implemented.");
        }

        public void CommitChanges() {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -