Inheritance: MonoBehaviour
Esempio n. 1
0
        public int Update(T obj)
        {
            if (obj is EntitiesBase)
            {
                EntitiesBase o = obj as EntitiesBase;

                o.ModifiedOn       = DateTime.Now;
                o.ModifiedUsername = "******";
            }

            return(Save());
        }
Esempio n. 2
0
        public int Delete(T obj)
        {
            if (obj is EntitiesBase)
            {
                EntitiesBase o = obj as EntitiesBase;

                o.ModifiedOn       = DateTime.Now;
                o.ModifiedUsername = "******";
            }

            _objectSet.Remove(obj);
            return(Save());
        }
Esempio n. 3
0
        public int Insert(T obj)
        {
            _objectSet.Add(obj);

            if (obj is EntitiesBase)
            {
                EntitiesBase o   = obj as EntitiesBase;
                DateTime     now = DateTime.Now;

                o.CreatedOn        = now;
                o.ModifiedOn       = now;
                o.ModifiedUsername = "******";
            }

            return(Save());
        }