using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Dao.Implement
{
    public class CarbonScene_SetRepository : RepositoryBase<CarbonScene>, ICarbonScene_SetRepository
    {
        public CarbonScene GetDataBy(int hostid)
        {
            var qqq = this.LoadAll().Where(A => A.HostID == hostid).FirstOrDefault();
            return qqq;
        }

        public int Add(CarbonScene entity)
        {
            int i = 0;
            string nnn = this.Save(entity).ToString();
            int.TryParse(nnn, out i);
            return i;
        }

        public void UpdateData(CarbonScene entity)
        {
            this.Update(entity);
        }
    }
}
