Ejemplo n.º 1
0
        public override ScalarCommand CreateIdentityInsertCommand(string tableName, IDictionary <string, object> columnValues)
        {
            var scalarCommand = new ScalarCommand();

            var insertCommand = CreateInsertCommand(tableName, columnValues);
            var selectCommand = _commandFactory.CreateCommand("SELECT CAST(@@IDENTITY AS int)");

            scalarCommand.PreparatoryCommands.Add(insertCommand);
            scalarCommand.ResultCommand = selectCommand;

            return(scalarCommand);
        }
Ejemplo n.º 2
0
        public override ScalarCommand CreateIdentityInsertCommand(string tableName, IDictionary<string, object> columnValues)
        {
            var scalarCommand = new ScalarCommand();

            var insertCommand = CreateInsertCommand(tableName, columnValues);
            var selectCommand = _commandFactory.CreateCommand("SELECT CAST(@@IDENTITY AS int)");

            scalarCommand.PreparatoryCommands.Add(insertCommand);
            scalarCommand.ResultCommand = selectCommand;

            return scalarCommand;
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Login(string login, string password)
        {
            var command = new ScalarCommand(String.Format("select pkg_cmacros.checkAccess('{0}', '{1}') from dual", login, password));
            var caller  = new DbCaller(command);

            caller.DoWork();
            if (caller.GetResult().ToString().Length == 6)
            {
                await Authenticate(new User(login, caller.GetResult().ToString()));

                return(RedirectToAction("Main", "Sheets"));
            }
            else
            {
                ViewBag.Message = caller.GetResult().ToString();
                return(View());
            }
        }