public bool Log(RegistroLog obj) { Db.Entry(obj).CurrentValues.SetValues(obj); Db.Entry(obj).State = EntityState.Added; _context.RegistrosLog.Add(obj); Save(); return(true); }
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); }