Beispiel #1
0
 public bool Log(RegistroLog obj)
 {
     Db.Entry(obj).CurrentValues.SetValues(obj);
     Db.Entry(obj).State = EntityState.Added;
     _context.RegistrosLog.Add(obj);
     Save();
     return(true);
 }
Beispiel #2
0
        public static RegistroLog ObjToModelLog(this ObjetoVM obj)
        {
            if (obj == null)
            {
                return(null);
            }

            var model = new RegistroLog()
            {
                Id_registro = obj.Id,
                Id_usuario  = obj.Usuario,
            };

            return(model);
        }