示例#1
0
        public ServerLog GetObjectByKey(long k_LogEntryID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_LogEntryID)) == false)
            {
                ServerLog ob = repository.GetQuery <ServerLog>().FirstOrDefault(o => o.LogEntryID == k_LogEntryID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            ServerLog obj = this[GetKey(k_LogEntryID)];

            return((ServerLog)obj);
        }
示例#2
0
 protected override KeyValuePair <string, long> GetKeyForItem(ServerLog item)
 {
     return(item.Key);
 }
示例#3
0
        public bool DeleteObject(ServerLog item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
示例#4
0
        public bool AddObject(ServerLog item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }