Inheritance: MonoBehaviour
Exemplo 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());
        }
Exemplo 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());
        }
Exemplo 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());
        }