public void EditGradebook(GradeBookView.StudentGrade gbUpdate)
        {
            //this approach makes two calls to the database there is probably a way to do this all in one SQL Stored Procedure
               using (var cn = new SqlConnection(Config.GetConnectionString()))
               {
               var p = new DynamicParameters();
               p.Add("@RosterId", gbUpdate.RosterId);
               p.Add("@AssignmentId", gbUpdate.AssignmentId);
               p.Add("@Points",gbUpdate.Points);
               p.Add("@Score", gbUpdate.Score);

               if (//checks to see if grade exists
                   cn.Query<AssignmentGrade>("AssignmentGrade_GetByRosterIdAndAssignmentId", p,
                       commandType: CommandType.StoredProcedure)
                       .Any())
               {
                   cn.Execute("AssignmentGrade_UpdateScore", p, commandType: CommandType.StoredProcedure); //updates existing grade
               }
               else
               {
                   cn.Execute("AssignmentGrade_Insert", p, commandType: CommandType.StoredProcedure); //creates new grade
               }

               }
        }
 public void Delete(Guid orderId)
 {
     using (var connection = new SqlConnection(SqlConnectionLocator.LocalhostSqlExpress())) {
         connection.Execute(SqlQueries.DeleteOrderLineQuery, new {OrderId = orderId});
         connection.Execute(SqlQueries.DeleteOrderQuery, new {OrderId = orderId});
     }
 }
Example #3
0
 public void InitDataBase(string connectionString)
 {
     Dictionary<int, int> provinceDictionary = new Dictionary<int, int>();
     using (var connection = new SqlConnection(connectionString))
     {
         connection.Open();
         connection.Execute(Const.DBCreateScript);
         connection.Execute("insert into Province values(@Name, @Code);"
             , ProvinceData.GetProvinces());
         var provinces = connection.Query("select code, id from Province;");
         foreach (var province in provinces)
         {
             provinceDictionary.Add((int)province.code, (int)province.id);
         }
         connection.Close();
     }
     BulkUploadToSql bulk =
             BulkUploadToSql.Load(
                 HomeData.GetHomes()
                     .Select(
                         i =>
                             new Bulk.Home
                             {
                                 AddTime = DateTime.Now,
                                 BuildYear = i.BuildYear,
                                 City = i.City,
                                 Description = i.Description,
                                 Price = i.Price,
                                 Surface = i.Surface,
                                 ProvinceId = provinceDictionary[i.HomeProvince.Code]
                             }), "Home", 10000, connectionString);
     bulk.Flush();
 }
        public void EditUser(EditUserRequest editUser)
        {
            using (var cn = new SqlConnection(Settings.GetConnectionString()))
            {
                var p = new DynamicParameters();
                p.Add("@UserId", editUser.LmsUser.UserId);
                p.Add("@IsStudent", editUser.IsStudent ? 1 : 0);
                p.Add("@IsParent", editUser.IsParent ? 1 : 0);
                p.Add("@IsTeacher", editUser.IsTeacher ? 1 : 0);
                p.Add("@IsAdmin", editUser.IsAdmin ? 1 : 0);

                cn.Execute("spUpdateUserRoles", p, commandType: CommandType.StoredProcedure);

                var p2 = new DynamicParameters();
                p2.Add("@UserId", editUser.LmsUser.UserId);
                p2.Add("@LastName", editUser.LmsUser.LastName);
                p2.Add("@FirstName", editUser.LmsUser.FirstName);
                p2.Add("@Email", editUser.LmsUser.Email);
                p2.Add("@SuggestedRole", editUser.LmsUser.SuggestedRole);
                p2.Add("@GradeLevelId", editUser.LmsUser.GradeLevelId);

                cn.Execute("spUpdateUserDetails", p2, commandType: CommandType.StoredProcedure);

            }
        }
Example #5
0
        public void Initialize()
        {
            using (var connection = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=tempdb;Integrated Security=True"))
            {
                connection.Open();
                try
                {
                    connection.Execute(@"ALTER DATABASE DapperSimpleCrudTestDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
                                                     DROP DATABASE DapperSimpleCrudTestDb ; ");
                }
                catch { }

                connection.Execute(@" CREATE DATABASE DapperSimpleCrudTestDb; ");
            }

            using (IDbConnection connection = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=DapperSimpleCrudTestDb;Integrated Security=True"))
            {
                connection.Open();
                connection.Execute(@" create table Users (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null, Age int not null, ScheduledDayOff int null) ");
                connection.Execute(@" create table Car (CarId int IDENTITY(1,1) not null, Make nvarchar(100) not null, Model nvarchar(100) not null) ");
                connection.Execute(@" create table City (Name nvarchar(100) not null, Population int not null, Version rowversion) ");
                connection.Execute(@" CREATE SCHEMA Log; ");
                connection.Execute(@" create table Log.CarLog (Id int IDENTITY(1,1) not null, LogNotes nvarchar(100) NOT NULL) ");

                connection.Execute("INSERT INTO USERS VALUES ('teste', 21, 1)");
            }
            Console.WriteLine("Created database");
        }
 public void Add(Order order)
 {
     using (var connection = new SqlConnection(SqlConnectionLocator.LocalhostSqlExpress())) {
         connection.Execute(SqlQueries.InsertOrderQuery, order);
         connection.Execute(SqlQueries.InsertOrderLineQuery, order.Lines);
     }
 }
Example #7
0
        private static void Setup()
        {
            using (var connection = new SqlConnection(@"Data Source=(LocalDB)\v11.0;Initial Catalog=Master;Integrated Security=True"))
            {
                connection.Open();
                try
                {
                    connection.Execute(@" DROP DATABASE DapperSimpleCrudTestDb; ");
                }
                catch (Exception)
                { }

                connection.Execute(@" CREATE DATABASE DapperSimpleCrudTestDb; ");
            }

            using (var connection = new SqlConnection(@"Data Source = (LocalDB)\v11.0;Initial Catalog=DapperSimpleCrudTestDb;Integrated Security=True"))
            {
                connection.Open();
                connection.Execute(@" create table Users (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null, Age int not null, ScheduledDayOff int null, CreatedDate datetime DEFAULT(getdate())) ");
                connection.Execute(@" create table Car (CarId int IDENTITY(1,1) not null, Id int null, Make nvarchar(100) not null, Color nvarchar(100) not null, AgeInYears int not null, Model nvarchar(100) not null) ");
                connection.Execute(@" create table BigCar (CarId bigint IDENTITY(2147483650,1) not null, Make nvarchar(100) not null, Model nvarchar(100) not null) ");
                connection.Execute(@" create table City (Name nvarchar(100) not null, Population int not null) ");
                connection.Execute(@" CREATE SCHEMA Log; ");
                connection.Execute(@" create table Log.CarLog (Id int IDENTITY(1,1) not null, LogNotes nvarchar(100) NOT NULL) ");
                connection.Execute(@" CREATE TABLE [dbo].[GUIDTest]([Id] [uniqueidentifier] NOT NULL,[name] [varchar](50) NOT NULL, CONSTRAINT [PK_GUIDTest] PRIMARY KEY CLUSTERED ([Id] ASC))");
                connection.Execute(@" create table StrangeColumnNames (ItemId int IDENTITY(1,1) not null Primary Key, word nvarchar(100) not null, colstringstrangeword nvarchar(100) not null) ");
                connection.Execute(@" create table UserWithoutAutoIdentity (Id int not null Primary Key, Name nvarchar(100) not null, Age int not null) ");

            }
            Console.WriteLine("Created database");
        }
 public void Add(Order order)
 {
     var persistentModel = _orderMapper.ToPersistentModel(order);
     using (var connection = new SqlConnection(SqlConnectionLocator.LocalhostSqlExpress())) {
         connection.Execute(SqlQueries.InsertOrderQuery, persistentModel);
         connection.Execute(SqlQueries.InsertOrderLineQuery, persistentModel.Lines);
     }
 }
 public void Add(Order order)
 {
     var orderState = new Order.ToState().Build(order);
     using (var connection = new SqlConnection(SqlConnectionLocator.LocalhostSqlExpress())) {
         connection.Execute(SqlQueries.InsertOrderQuery, orderState);
         connection.Execute(SqlQueries.InsertOrderLineQuery, orderState.Lines);
     }
 }
 public void Update(Order order)
 {
     using (var connection = new SqlConnection(SqlConnectionLocator.LocalhostSqlExpress())) {
         connection.Execute(SqlQueries.UpdateOrderQuery, order);
         connection.Execute(SqlQueries.DeleteOrderLineQuery, new {OrderId = order.Id});
         connection.Execute(SqlQueries.InsertOrderLineQuery, order.Lines);
     }
 }
Example #11
0
        private static void ReCommit(SqlConnection db, SqlTransaction transaction, List<MovementRegisterItem> docs)
        {
            foreach (var item in docs.Reverse<MovementRegisterItem>())
                db.Execute(item.RollbackCommand, new { item.DocId }, transaction: transaction);

            foreach (var item in docs)
                db.Execute(item.CommitCommand, new { item.DocId }, transaction: transaction);
        }
Example #12
0
 public override void WriteDeal(string path, string serializedDeal)
 {
     using (SqlConnection connection = new SqlConnection(_connectionString))
     {
         connection.Open();
         connection.Execute(@"delete from Deals where Id = @Id", new { Id = path });
         connection.Execute(@"insert Deals(Id, Value) values (@Id, @Value)",
             new {Id = path, Value = serializedDeal});
     }
 }
Example #13
0
 public void Save(string id, string serializedDeal)
 {
     using (SqlConnection connection = new SqlConnection(_connectionString))
     {
         connection.Open();
         connection.Execute(@"delete from Deals where Id = @Id", new { Id = id });
         connection.Execute(@"insert Deals(Id, Value) values (@Id, @Value)",
             new {Id = id, Value = serializedDeal});
     }
 }
Example #14
0
 static SqlServerTestSuite()
 {
     using (var connection = new SqlConnection(ConnectionString))
     {
         // ReSharper disable once AccessToDisposedClosure
         Action<string> dropTable = name => connection.Execute([email protected]"IF OBJECT_ID('{name}', 'U') IS NOT NULL DROP TABLE [{name}]; ");
         connection.Open();
         dropTable("Stuff");
         connection.Execute(@"CREATE TABLE Stuff (TheId int IDENTITY(1,1) not null, Name nvarchar(100) not null, Created DateTime null);");
         dropTable("People");
         connection.Execute(@"CREATE TABLE People (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null);");
         dropTable("Users");
         connection.Execute(@"CREATE TABLE Users (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null, Age int not null);");
         dropTable("Automobiles");
         connection.Execute(@"CREATE TABLE Automobiles (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null);");
         dropTable("Results");
         connection.Execute(@"CREATE TABLE Results (Id int IDENTITY(1,1) not null, Name nvarchar(100) not null, [Order] int not null);");
         dropTable("ObjectX");
         connection.Execute(@"CREATE TABLE ObjectX (ObjectXId nvarchar(100) not null, Name nvarchar(100) not null);");
         dropTable("ObjectY");
         connection.Execute(@"CREATE TABLE ObjectY (ObjectYId int not null, Name nvarchar(100) not null);");
         dropTable("ObjectZ");
         connection.Execute(@"CREATE TABLE ObjectZ (Id int not null, Name nvarchar(100) not null);");
     }
 }
Example #15
0
 public ActionResponse Execute() {
     using (var cn = new SqlConnection(_output.Connection.GetConnectionString())) {
         cn.Open();
         try {
             cn.Execute(_output.SqlDropStarView());
         } catch (SqlException) {
         }
         cn.Execute(_output.SqlCreateStarView());
     }
     return new ActionResponse();
 }
 /// <summary>
 /// Updates an existing patient in the repository
 /// </summary>
 /// <param name="entity">Entity to update</param>
 public void Update(Domain.Patient entity)
 {
     const string CurrentAddressSql = "UPDATE patient.CurrentAddress SET Street = @Street, Unit = @Unit, City = @City, State = @State, ZipCode = @ZipCode, ZipCodeSupplement = @ZipCodeSupplement WHERE CurrentAddressId = @currentAddressId;";
     const string PatientSql = "UPDATE patient.Patient SET FirstName = @FirstName, LastName = @LastName WHERE PatientId = @PatientId";
     using (IDbConnection connection = new SqlConnection(_connectionString))
     {
         connection.Open();
         connection.Execute(CurrentAddressSql, entity.CurrentAddress);
         connection.Execute(PatientSql, entity);
     }
 }
 public static void ProvisionDatabase(SqlConnection connection, string schemaName = "[dbo]", bool dropExisting = false)
 {
     if (dropExisting)
     {
         Database.Tables.ForEach(z => connection.DropTableIfExists(schemaName, z));
     }
     if (false == connection.SchemaExists(schemaName))
     {
         connection.Execute($"CREATE SCHEMA {schemaName}");
     }
     Database.Structure(schemaName).ForEach(z => connection.Execute(z));
 }
        public void RenameImageAndUsages(PlantPhoto plantPhoto)
        {
            var dateString = _now.ToString("yyyy-MM-dd HH:mm:ss.fff");
              var fileManager = new TxFileManager();

              try {
            using (var conn = new SqlConnection(_settings.ConnectionString))
            using (var scope = new TransactionScope()) {
              conn.Open();

              conn.Execute(_photoUpdateQuery,
            new { OldPhotoId = plantPhoto.PhotoId, NewPhotoId = plantPhoto.PhotoId.AddTif(), NewUpdatedAt = _now });

              conn.Execute(_usageUpdateQuery,
            new { plantPhoto.PhotoId, NewPhotoId = plantPhoto.PhotoId.AddTif() });

              foreach (var imageRoot in _settings.ImageRoots)
              {
            var imagePath = plantPhoto.GetActualImagePath(imageRoot);
            var newPath = plantPhoto.GetReplacementPath(imageRoot, _settings.TargetExtension);

            if (File.Exists(imagePath)) {
              fileManager.Move(imagePath, newPath);
            }
              }

              foreach (var thumbnailRoot in _settings.ThumbnailRoots)
              {
            var thumbPath = plantPhoto.GetThumbnailPath(thumbnailRoot);
            var newPath = plantPhoto.GetReplacementPath(thumbnailRoot, _settings.TargetExtension, true);

            if (File.Exists(thumbPath)) {
              fileManager.Move(thumbPath, newPath);
            }
              }

              scope.Complete();
              var message = string.Format("{0}\t{0}{1}\t{2}", plantPhoto.PhotoId, _settings.TargetExtension, dateString);
              Logger.Info(message);
            }
              }
              catch (TransactionAbortedException trex)
              {
            Logger.Error(string.Format("{0}\t{1}", plantPhoto.PhotoId, trex.Message.Replace(Environment.NewLine, " ")));
              }
              catch (Exception exc)
              {
            Logger.Error(string.Format("{0}\t{1}", plantPhoto.PhotoId, exc.Message.Replace(Environment.NewLine, " ")));
              }
        }
Example #19
0
        private void Run()
        {
            int count = 0;

            using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Database"].ConnectionString))
            {
                connection.Execute("create table List (Id int identity primary key, payload nvarchar(max))");
                while (true)
                {
                    connection.Execute("insert into list (payload) values (@payload)", new {payload = "@@@"});
                    Console.WriteLine("Count: {0}", ++count);
                }
            }
        }
        public void RemoveFolder(string folderName)
        {
                try
                {

                    string query = "delete from [PostOfficeFoldersByUser]"
                        + " where [Name] = @Name"
                        + " and [ActiveDirectoyUser] = @ActiveDirectoyUser";

                    using (SqlConnection db = new SqlConnection(ConfigurationValues.PostOfficeDatabaseConnection))
                    {
                        int rowsAffectd = db.Execute(query, new
                        {
                            @ActiveDirectoyUser = Utility.GetUserName(),
                            @Name = folderName,
                        }
                            );
                    }

                    //operationResult.Success = true;
                    // return operationResult;
                }
                catch (Exception er)
                {
                    Logging.LogErrors(ConfigurationValues.ErrorLogPath, er.ToString());
                }
        }
 public bool UpdateFaxEntry(SendFaxInformation faxEntry )
 {
     using (IDbConnection db = new SqlConnection(ConfigurationValues.PostOfficeDatabaseConnection))
     {
         try
         {
             const string query = "update FaxSendingInformation "
                 + " set FirstName = @FirstName"
                 + " , LastName = @LastName"
                 + " , Name = @Name"
                 + " , FaxNumber = @FaxNumber"
                 + " , Prefix = @Prefix"
                 + " , Suffix = @Suffix"
                 + " where SendFaxID = @SendFaxID";
             int rowsAffectd = db.Execute(query, new
             {
                 @FirstName = faxEntry.FirstName,
                 @LastName = faxEntry.LastName,
                 @Name = faxEntry.Name,
                 @FaxNumber = faxEntry.FaxNumber,
                 @SendFaxID = faxEntry.SendFaxID,
                 @Prefix = faxEntry.Prefix,
                 @Suffix = faxEntry.Suffix
             });
             return true;
         }
         catch (Exception er)
         {
             string s1 = er.ToString();
             return false;
             //Log.LogMessage(er.ToString());
         }
     }
 }
        public OperationResult DeleteFaxEntry(int sendToFaxID)
        {
            OperationResult operationResult = new OperationResult();

            using (IDbConnection db = new SqlConnection(ConfigurationValues.PostOfficeDatabaseConnection))
            {
                try
                {
                    const string query = "delete from FaxSendingInformation "
                        + " where SendFaxID = @SendFaxID";
                    int rowsAffectd = db.Execute(query, new
                    {
                        @SendFaxID = sendToFaxID.ToString()
                    });

                    operationResult.Success = true;
                    return operationResult;
                }
                catch (Exception er)
                {
                    operationResult.Success = true;
                    operationResult.AddMessage(er.ToString());
                    return operationResult;
                }
            }
        }
        public void Write(IEnumerable<Row> rows) {
            var sql = _context.SqlUpdateCalculatedFields(_original);
            var temp = new List<Field> { _context.Entity.Fields.First(f => f.Name == Constants.TflKey) };
            temp.AddRange(_context.Entity.CalculatedFields.Where(f => f.Output && f.Name != Constants.TflHashCode));
            var fields = temp.ToArray();

            var count = 0;
            using (var cn = new SqlConnection(_context.Connection.GetConnectionString())) {
                cn.Open();
                foreach (var batch in rows.Partition(_context.Entity.UpdateSize)) {
                    var trans = cn.BeginTransaction();
                    var batchCount = cn.Execute(
                        sql,
                        batch.Select(r => r.ToExpandoObject(fields)),
                        trans,
                        _context.Connection.Timeout,
                        CommandType.Text
                    );
                    trans.Commit();
                    count += batchCount;
                    _context.Increment(batchCount);
                }
                _context.Info("{0} to {1}", count, _context.Connection.Name);
            }
            _context.Entity.Updates += count;
        }
Example #24
0
		public int LogETSubscriberChange(string listName, int id, string status, string email, string action, Guid committeeID, string committeeName)
		{
			using (var conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DynamicsExtension"].ConnectionString))
			{
				return
					conn.Execute(
					   @"INSERT INTO [dbo].[ETAutomation_ChangeLog]
		   ([ETListID]
		   ,[ETListName]
		   ,[ETSubscriberKey]
		   ,[ETSubscriberStatus]
		   ,[Action]
		   ,[CommitteeID]
		   ,[CommitteeName]
		   ,[CreatedDateTime])
	 VALUES
		   (@ETListID
		   ,@ETListName
		   ,@ETSubscriberKey
		   ,@ETSubscriberStatus
		   ,@Action
		   ,@CommitteeID
		   ,@CommitteeName
		   ,@CreatedDateTime)", new { ETListID = id, ETListName = listName, ETSubscriberStatus = status, ETSubscriberKey = email, Action = action, CommitteeID = committeeID, CommitteeName = committeeName, CreatedDateTime = DateTime.Now }
						);
			}
		}
 public void DeleteLoyaltyCard(Guid guid)
 {
     using (SqlConnection connection = new SqlConnection(this._connectionString))
     {
         connection.Execute("Delete From VintageRabbit.LoyaltyCards Where Guid = @Guid", new { Guid = guid });
     }
 }
        private static void EnsureDatabase()
        {
            using (var connection = SqlConnections.NewByKey("Default"))
                try
                {
                    connection.Open();
                }
                catch
                {
                    var cb = new DbConnectionStringBuilder();
                    cb.ConnectionString = SqlConnections.GetConnectionString("Default").ConnectionString;
                    var catalog = cb["Initial Catalog"];
                    cb["Initial Catalog"] = null;
                    cb["AttachDBFilename"] = null;

                    using (var serverConnection = new SqlConnection(cb.ConnectionString))
                    {
                        serverConnection.Open();
                        serverConnection.Execute(String.Format(
                            @"CREATE DATABASE [{0}] ON PRIMARY (Name = N'{0}', FILENAME = '{1}\{0}.mdf') LOG ON (NAME = N'{0}_log', FILENAME = '{1}\{0}.ldf');",
                                catalog, HostingEnvironment.MapPath("~/App_Data")));
                    }

                    SqlConnection.ClearAllPools();
                }

            RunMigrations();
        }
 public void Drop(DatabaseObjectName name)
 {
     using (var connection = new SqlConnection(connectionString))
     {
         connection.Execute(dropProcedureCommand, name);
     }
 }
        public void Update(ParsedMessage entity)
        {
            using (var conn = new SqlConnection(Settings.Default.ConnectionString))
            {
                conn.Open();

                conn.Execute("UPDATE ParsedMessage SET " +
                             "BodyParsed = @BodyParsed, " +
                             "BodyPlain = @BodyPlain, " +
                             "BodyRich = @BodyRich, " +
                             "ClientType = @ClientType, " +
                             "CreatedAt = @CreatedAt, " +
                             "IsDirectMessage = @IsDirectMessage, " +
                             "GroupId = @GroupId, " +
                             "RepliedToId = @RepliedToId, " +
                             "SenderId = @SenderId, " +
                             "ThreadId = @ThreadId, " +
                             "Url = @Url, " +
                             "WebUrl = @WebUrl, " +
                             "LikedByCount = @LikedByCount, " +
                             "LikedByNames = @LikedByNames " +
                             "WHERE Id = @Id",
                             entity);
            }
        }
        public bool AddSignature(Annotations customAnnotation)
        {
            using (IDbConnection db = new SqlConnection(ConfigurationValues.PostOfficeDatabaseConnection))
            {
                try
                {
                    const string query = "INSERT INTO [Annotation]"
                        + " ("
                        + " [ActiveDirectoryUser]"
                        + ",[Name]"
                        + " ,[Annotation]"
                        + " )"
                        + " VALUES"
                        + " ("
                        + "@ActiveDirectoryUser,@Name,@Annotation"
                        + " )";

                    int rowsAffectd = db.Execute(query, new
                    {
                        @ActiveDirectoryUser = customAnnotation.ActiveDirectoryUser,
                        @Name = customAnnotation.Name,
                        @Annotation = customAnnotation.NewAnnotation
                    });
                    return true;
                }
                catch (Exception er)
                {
                    string s1 = er.ToString();
                    return false;
                    //Log.LogMessage(er.ToString());
                }
            }
        }
        private static void TableValuedParms()
        {
            //HERE DATATABLE NAME SHOULD BE THE TABLEVALUE TYPE NAME OTHERWISE WILL GET AN ERROR TYPENAME IS FOUND
            var dt = new DataTable { TableName = "DepartmentType" };
            dt.Columns.Add("DepartmentId", typeof(int));
            dt.Columns.Add("Name", typeof(string));

            var arrayName = new[] { "HR", "Dev", "DevOps", "Admin" };

            for (var i = 0; i <= 3; i++)
            {
                var row = dt.NewRow();
                row["DepartmentId"] = i + 2;
                row["Name"] = arrayName[i];
                dt.Rows.Add(row);
            }

            using (var con = new SqlConnection(ConString))
            {
                var parameters = new DynamicParameters();
                parameters.Add("@DepartmentDetails", dt, DbType.Structured, ParameterDirection.Input);
                parameters.Add("@ReturnValue", 0, direction: ParameterDirection.ReturnValue);
                con.Execute("spBulkInsert", parameters, CommandType.StoredProcedure);

                Console.WriteLine("\nExpected - {0}, Got - {1}", 4, parameters.Get<int>("@ReturnValue"));
            }
        }