Archives

Archives / 2018 / June
  • Some notes on xUnit usage

    Hello everybody,

    today I want to share with you small explanation about how xUnit works. 

    Take a look at presented code:

    [Theory]

    [InlineData(3, 4, 5)]

    [InlineData(7, 8, 9)]

    public void MethodDemo(int numberOne, int numberTwo, int numberThree)

    {

        double[][] data = new double[1][];

        data[0] = new double[3];

        data[0][0] = numberOne;

        data[0][1] = numberTwo;

        data[0][2] = numberThree;

        var sut = new Matrix(data);

    }

    If to describe this code in words, it has following meaning. 

    Attribute Theory says that it is test method which should be exeuted.

    Repeated twice Attribute InlineData says that method MethodDemo should be executed twice, with assigning to … more

  • Access rights in Acumatica

    Hello everybody,

    today I want to leave a short notice on how access rights work in Acumatica. So, if to enumerate them, there are following access permissions: revoked, select, update, insert, delete. 

    If to enumerate them in the list of smallest permissions to biggest, it will be list like this:

    Revoked - user can't see or edit

    Select - user can see, can't edit

    Update - user can see and edit

    Insert - user can see, edit, create new

    Delete - user can see, edit, create, delete

    So, if you configure permissions, and want to give highest level, then give Delete. But if you want to protect system from accidental deletion, then most probably you'll need give them Select set of … more

  • C# async/await usage

    Hello everybody,

    today I want to describe in simple words what C# does for .Net cases in IIS.

    Before I continue, I want to point the following. As usually IIS has 500 threads. It means that one IIS server can simultaneously server 500 customers. Keeping this idea in mind

    take a look at the following code:

    [HttpGet]

    public IEnumerable<string> GetSync()

    {

        string val1 = "value" +  LongRunningMethod().ToString();

        string val2 = "value2";

        return new[] { val1, val2 };

    }

    private int LongRunningMethod()

    {

        Thread.Sleep(10000);

        return 10;

    }

    and imagine that you have 600 customers simultaneously. For 500 lucky users of your web site it will mean that their … more

  • Import export data between different SQL servers

    Hello everybody,

    today I want to share some information on how to import some big chunks of data from one server to another. Need for this movement for me personally arised when I had a need to transfer big amounts of data on a regular basis. Big amount means 2.5 millons of records. My first apporach was to use SQL Server 2017 Import and Export Data. Initially I've used 32 bit tool, and found out that I sometime face strange error messages. After some googling I've found that for big volumes of data it's better to use SQL Server 2017 Import and Export Data 64 bit. 

    and all of the sudden strange configuration errors, drivers lack error, ODBC driver error had leave me. 

    So, one of the … more