Category: Uncategorized

  • When to use Blazor

    Blazor is a fully featured web UI framework designed to handle the needs of most modern web apps. But whether Blazor is the right framework for you depends on many factors.

    dell emc certification malaysia

    You should consider using Blazor for web development if:

    • You’re looking for a highly productive full stack web development solution.
    • You need to deliver web experiences quickly without the need for a separate frontend development team.
    • You’re already using .NET, and you want to apply your existing .NET skills and resources on the web.
    • You need a high-performance and highly scalable backend to power your web app.

    comptia certification malaysia

    Blazor might not be a good fit if:

    • You need to fully optimize download size and load time of client-side assets.
    • You need to integrate heavily with a different frontend framework ecosystem.
    • You need to support older web browsers that don’t support the modern web platform.

    citrix certification malaysia 2

  • Evaluating Reservations

    Various Evaluations for Reservations

    Various functions are available in SAP S/4HANA for selecting reservations.

    • SAP Fiori app Manage Manuel Reservations
    • SAP Fiori app Manage Reservation Items
    • SAP Fiori app Display Reservation List or the corresponding SAP GUI transaction MB25 (Reservation List)
    • SAP Fiori app Manage Reservations or the corresponding SAP GUI transaction MBVR (Manage Reservations)
    • SAP GUI transaction MB26 (Pick List)

    Manage Manuel Reservations App and Manage Reservation Items App

    Note the following for these apps:

    In the Manage Manual Reservations app, the results list contains one entry for each selected reservation. For example, you can see in the list how many items the reservation contains and how many of them are marked as Completed. Details of individual items are not shown in the list.

    With the Manage Manual Reservations app, only manually created reservations can be selected. Dependent reservations, such as reservations for a production order are not selected.

    To create a list of individual reservation items, use the Manage Reservation Items app.

    In both apps, different filter criteria are available to restrict the selection.

    loyalty

    Reservation List Inventory Management

    The Reservation List provides another option for evaluating reservations at item level. You can call this function via the SAP Fiori app Display Reservation List or the SAP GUI transaction MB25 (Reservation List).

    Various criteria are available in this report for selecting reservations, such as:

    • Material
    • Requirement date
    • User name (created by)
    • Goods recipient
    • Account assignment (such as cost center, order, work breakdown structure element)

    The report issues a list with reservation items according to the selection. Receipt reservations are highlighted in yellow. For each reservation item, a variety of detailed information is displayed. Among other things, the following values are shown:

    • Reservation number and item
    • Material
    • Requirements quantity
    • Movement type
    • Account assignment
    • Requirement date
    • Difference quantity between the reserved and already reduced quantity

    If you require further data and want to evaluate it in detail, enhance the current layout or select another existing layout by choosing (Menu)SettingsLayout.

    To display a reservation from the list, double-click the reservation number. If you double-click the reservation item, you can see the details of this item.

    it support

    Reservation Management

    With the Reservation Management report, you can set the Movement Allowed indicator for reservations created manually through a mass change. You can also delete reservations with the reservation management report. You can call this function via the SAP Fiori app Manage Reservations or the SAP GUI transaction MBVR (Manage Reservations).

    The base date is of double importance in this report. On the one hand, the base date serves as a selection value. This means that only reservations that have a base date in the reservation header less than or equal to this date are taken into account for further processing. On the other hand, it is used to calculate the time intervals used in the two functions (mass change and deletion of reservations).

    Picking Lists for Reservations (Transaction MB26)

    The picking list enables you to enter and post goods movements for several reservations in one processing step. When generating a picking list, you can select according to reservations, material and account assignments, and production orders.

    Before posting, you can change the entry quantity for each item, set the Final Issue Affected indicator, and if necessary, enter a storage location. To determine the stocks to be posted for stock transfers and GIs, you can call up stock determination by choosing GotoStock Determination, and batch determination by choosing EnvironmentBatch ManagementBatch Determination. If it is necessary to split an item for a goods movement, choose EditSplitting.

    it consulting

  • Exercise – Add new pizza form

    In this unit, you’ll finish the Pizza List page by adding a form to create new pizzas. You’ll also add page handlers to handle the form submission and deletion of pizzas.

    ibm aix system i training courses malaysia

    Add a form to create new pizzas

    Let’s start by adding properties to the PizzaListModel class to represent the user’s input. You’ll add the appropriate page handler, too.

    1. Open Pages\PizzaList.cshtml.cs and add the following property to the PizzaListModel class:C#[BindProperty] public Pizza NewPizza { get; set; } = default!; In the preceding code:
      • A property named NewPizza is added to the PizzaListModel class.
        • NewPizza is a Pizza object.
      • The BindProperty attribute is applied to the NewPizza property.
        • The BindProperty attribute is used to bind the NewPizza property to the Razor page. When an HTTP POST request is made, the NewPizza property will be populated with the user’s input.
      • The NewPizza property is initialized to default!.
        • The default! keyword is used to initialize the NewPizza property to null. This prevents the compiler from generating a warning about the NewPizza property being uninitialized.
    2. Now add the page handler for HTTP POST. In the same file, add the following method to the PizzaListModel class:C#public IActionResult OnPost() { if (!ModelState.IsValid || NewPizza == null) { return Page(); } _service.AddPizza(NewPizza); return RedirectToAction("Get"); } In the preceding code:
      • The ModelState.IsValid property is used to determine if the user’s input is valid.
        • The validation rules are inferred from attributes (such as Required and Range) on the Pizza class in Models\Pizza.cs.
        • If the user’s input is invalid, the Page method is called to re-render the page.
      • The NewPizza property is used to add a new pizza to the _service object.
      • The RedirectToAction method is used to redirect the user to the Get page handler, which will re-render the page with the updated list of pizzas.
    3. Save the file. If you’re using GitHub Codespaces, the file saves automatically.
    4. Return to the terminal running dotnet watch and press Ctrl+R to reload the app.

    Now that there’s a page handler to handle the form submission, let’s add the form to the Razor Page.

    1. Open Pages\PizzaList.cshtml and replace the <!-- New Pizza form will go here --> with the following code:razor<form method="post"> <div asp-validation-summary="ModelOnly" class="text-danger"></div> <div class="form-group"> <label asp-for="NewPizza.Name" class="control-label"></label> <input asp-for="NewPizza.Name" class="form-control" /> <span asp-validation-for="NewPizza.Name" class="text-danger"></span> </div> <div class="form-group"> <label asp-for="NewPizza.Size" class="control-label"></label> <select asp-for="NewPizza.Size" class="form-control" id="PizzaSize"> <option value="">-- Select Size --</option> <option value="Small">Small</option> <option value="Medium">Medium</option> <option value="Large">Large</option> </select> <span asp-validation-for="NewPizza.Size" class="text-danger"></span> </div> <div class="form-group form-check"> <label class="form-check-label"> <input class="form-check-input" asp-for="NewPizza.IsGlutenFree" /> @Html.DisplayNameFor(model => model.NewPizza.IsGlutenFree) </label> </div> <div class="form-group"> <label asp-for="NewPizza.Price" class="control-label"></label> <input asp-for="NewPizza.Price" class="form-control" /> <span asp-validation-for="NewPizza.Price" class="text-danger"></span> </div> <div class="form-group"> <input type="submit" value="Create" class="btn btn-primary" /> </div> </form> In the preceding code:
      • The asp-validation-summary attribute is used to display validation errors for the entire model.
      • Each form field (<input> and <select> elements) and each <label> is bound to the corresponding NewPizza property using the asp-for attribute.
      • The asp-validation-for attribute is used to display any validation errors for each form field.
      • The @Html.DisplayNameFor method is used to display the display name for the IsGlutenFree property. This is a Razor helper method that’s used to display the display name for a property. Doing the label this way ensures that the checkbox is selected when the user clicks the label.
      • A submit button labeled Create is added to the form to post the form data to the server. At runtime, when the user selects this Create button, the browser sends the form as an HTTP POST request to the server.
    2. At the bottom of the page, add the following code:razor@section Scripts { <partial name="_ValidationScriptsPartial" /> } This injects the client-side validation scripts into the page. The client-side validation scripts are used to validate the user’s input before the form is submitted to the server.
    3. Save the file. In the browser, the Pizza List page refreshes with the new form. If you’re using GitHub Codespaces, the file saves automatically, but you’ll need to refresh the browser tab manually.Screenshot of the PizzaList page with the new pizza form.
    4. Enter a new pizza and select the Create button. The page should refresh and display the new pizza in the list.

    hadoop training courses malaysia

    Add a page handler to delete pizzas

    There’s one last piece to add to the Pizza List page: a page handler to delete pizzas. The buttons to delete pizzas are already on the page, but they don’t do anything yet.

    1. Back in Pages\PizzaList.cshtml.cs, add the following method to the PizzaListModel class:C#public IActionResult OnPostDelete(int id) { _service.DeletePizza(id); return RedirectToAction("Get"); } In the preceding code:
      • The OnPostDelete method is called when the user clicks the Delete button for a pizza.
        • The page knows to use this method because the asp-page-handler attribute on the Delete button in Pages\PizzaList.cshtml is set to Delete.
      • The id parameter is used to identify the pizza to delete.
        • The id parameter is bound to the id route value in the URL. This is accomplished with the asp-route-id attribute on the Delete button in Pages\PizzaList.cshtml.
      • The DeletePizza method is called on the _service object to delete the pizza.
      • The RedirectToAction method is used to redirect the user to the Get page handler, which will re-render the page with the updated list of pizzas.
    2. Save the file. If you’re using GitHub Codespaces, the file saves automatically.
    3. Test the Delete button for a pizza. The page should refresh and the selected pizza should be removed from the list.

    Congratulations! You’ve successfully created a Razor Page that displays a list of pizzas, allows the user to add new pizzas, and also allows the user to delete pizzas.

    exchange server certification training courses malaysia

  • Applying Tolerances and the Delivery Completed Indicator

    Underdeliveries and Overdeliveries in Goods Receipt for Purchase Order

    The system automatically adjusts the open purchase order quantity for each goods movement for the purchase order item (goods receipt, subsequent delivery, return delivery, and cancellation).

    oracle e business suite training courses malaysia

    At goods receipt, you must change the proposed quantity to match the quantity actually delivered. The system compares the goods receipt quantity with the open purchase order quantity and determines whether there is an underdelivery or overdelivery. 

    oracle database training courses malaysia

    Underdelivery and Overdelivery

    Default Values for Underdelivery and Overdelivery Tolerances 

    If the same underdelivery and overdelivery tolerances always apply for one material, you can define them in the material master record as default values for purchasing. The tolerances are determined by the purchasing value key specified in the purchasing data of the material master record.

    oracle cloud infrastructure training courses malaysia

    The purchasing value key delivers the further default values and is created in Customizing for Materials Management under PurchasingMaterial MasterDefine Purchasing Value Keys

    nodejs training courses malaysia

    If underdelivery and overdelivery tolerances that vary from the material master record are valid for a vendor-material combination, you can define the tolerances in the purchasing info record for the vendor and material.

    mysql database training courses malaysia

    It is also possible to specify tolerances directly in the order. The Tolerance limit for underdelivery and Tolerance limit for overdelivery fields, as well as the Unlimited overdelivery allowed indicator, are found in the detail data of an item on the Delivery tab page.

    microsoft 365 certification training courses malaysia

    Delivery Completed Indicator

    The Delivery Completed indicator specifies whether a purchase order item is considered closed. This means that no more goods receipts are expected for this item. If theDelivery Completed indicator is set, the open purchase order quantity becomes zero, even if the full quantity has not been delivered. It is still possible to post goods receipts of remaining quantities, but these no longer change the open purchase order quantity.

    lpi linux administration certification training courses malaysia

    Setting the Delivery Completed indicator in a PO item has the following effects:

    • The open PO quantity of the PO item equals zero.
    • The PO item is no longer relevant for materials planning.
    • The PO item is ignored when letters urging delivery of overdue goods are generated.
    • An additional delivery is not expected, but is possible.
    • The commitment for the PO item is canceled.
    • The PO item can be deleted and archived.

    lean six sigma certification training courses malaysia

    Selection of the Delivery Completed Indicator

    The various ways in which the Delivery Completed indicator can be set in a purchase order item are as follows:

    • Manually when changing a purchase order item
    • Manually when entering a goods receipt for the purchase order item with the SAP Fiori app Post Goods Receipt for Purchasing Document
    • Manually when entering a goods movement for the purchase order item (GR, return delivery, subsequent delivery, and cancellation) with the Post Goods Movement app or the transaction MIGO
    • Automatically when entering a goods receipt for the purchase order itemIn Customizing for Inventory Management and Physical Inventory, you can determine for each plant whether the system automatically selects the Delivery Completed checkbox for delivery quantities within the underdelivery and overdelivery tolerances.Go to Customizing for Materials Management under Inventory Management and Physical InventoryGoods ReceiptSet Delivery Completed Indicator (OMCD).

    application services

  • Introduction

    In this module, you’ll create a cross-platform ASP.NET Core Razor Pages web app with .NET and C#.

    oracle e business suite training courses malaysia

    Example Scenario

    Suppose you’re an employee of a pizza company named Contoso Pizza. Your manager has asked you to develop a pizza inventory management page as a prerequisite for the company’s internal admin website. The app should be built in such a way that the view and data model concerns are separated.

    oracle database training courses malaysia

    What will you be doing?

    In this module, you will:

    • Understand when and why to use Razor Pages for your ASP.NET Core app.
    • Review an existing ASP.NET Core app that uses Razor Pages.
    • Create a new Razor Page that supports the app’s product data management requirements.
    • Use tag helpers to reduce the context switching between HTML and C#.
    • Use Razor Page handlers to handle HTTP requests.

    At the end of this module, there are links to content providing deeper dives for each feature area introduced.

    oracle cloud infrastructure training courses malaysia

    Required tools

    This module uses the .NET CLI and Visual Studio Code (Windows, Linux, and macOS) to demonstrate ASP.NET Core Razor Pages development. After completing this module, you can apply its concepts using a development environment like Visual Studio (Windows), Visual Studio for Mac (macOS), or Visual Studio Code.

    nodejs training courses malaysia

     Tip

    You can skip installing the tools below by using GitHub Codespaces as your IDE. In another browser tab, navigate to the GitHub repository containing the starter app for this module, select the Code button, and create a new codespace on the main branch. For more information, see Create a Codespace.

    mysql database training courses malaysia

    Alternatively, you can use the Dev Containers extension for Visual Studio Code. With the extension installed, press F1 to open the command pallette, then search for and select Dev Containers: Clone Repository in Container Volume and provide the URL https://github.com/MicrosoftDocs/mslearn-create-razor-pages-aspnet-core. This will clone the repository and open it in a container with all the required tools installed.

    microsoft 365 certification training courses malaysia

    The following tools are required:

    .NET SDK

    This module uses the .NET 8.0 SDK. Ensure that you have .NET 8.0 installed by running the following command in your preferred command terminal:

    .NET CLI

    dotnet --list-sdks
    

    Output similar to the following example appears:

    Console

    6.0.317 [C:\Program Files\dotnet\sdk]
    7.0.401 [C:\Program Files\dotnet\sdk]
    8.0.100 [C:\Program Files\dotnet\sdk]
    

    Ensure that a version that starts with 8 is listed. If none is listed or the command isn’t found, install the most recent .NET 8.0 SDK.

    GitHub CLI

    To clone the sample app from GitHub, you’ll need the GitHub CLI.

    Visual Studio Code

    Ensure you have latest versions of Visual Studio Code and the C# Dev Kit installed.

    lpi linux administration certification training courses malaysia

  • Moving Goods with the Post Goods Movement App

    The Post Goods Movements App

    The Post Goods Movement app is a SAP GUI for HTML transaction. The app is part of the Business Roles Warehouse Clerk (SAP_BR_WAREHOUSE_CLERK) and Inventory Manager (SAP_BR_INVENTORY_MANAGER), for example.

    ccna certification training courses malaysia

    With this app, you can record all types of goods movements. This includes, for example: Goods receipts and goods issues with and without reference, but also transfer postings. In addition, you can use the app to display, change and cancel material documents.

    careers

    As you can see in the preceding figure, the app can be divided into the following screen areas:

    • Header data
    • Item overview
    • Item details
    • Overview tree

    In the header and detail data screen areas, the information is grouped on individual tab pages.

    rooms

    Header data

    The header data contains information that refers to the complete material document, such as the document and posting date, the document header text, the person who created it, and the entry date. You can branch from the header data to the accounting document.

    dell emc certification malaysia

    Item overview and item details

    The document items are listed in the item overview. If you click the number of an item in the overview, the system opens the detail data for this item. In both the item overview and the item details, you will find, for example, details such as plant and storage location and the movement type, but also information about the reference document or account assignment.

    comptia certification malaysia

    Overview tree

    The overview tree displays your last 10 documents for purchase orders, orders, reservations, material documents, and held data. The system inserts these documents automatically into the overview tree. These documents are documents you referred to when posting a goods movement, as well as the material documents that were created.

    citrix certification malaysia 2

    You therefore always have an overview of the activities you last executed.

    cisco certification malaysia

    You can open and close the individual screen areas, except the item overview. You can show and hide the overview tree using Show/Hide Overview. For the header, choose Open/Close Header Data, and for the item details, choose Open/Close Detail Data. You can also open the item details by clicking the item number in the item overview.

    checkpoint certification malaysia

    Navigation in Post Goods Movement App

    purchasing documents, or material documents by choosing (Find Document).

    aws certification malaysia

    When you call the search function, enter your search criteria in the dialog box. The search result is displayed in a separate screen area at the bottom of the screen. You can use the SAP List Viewer (ALV) functions in the results list to sort the documents according to different criteria. You can double-click a document in the search result to transfer it to the item overview for processing.

    virtualization training courses malaysia

    To close the window with the search results, choose (Close Search Result).

    qa testing training courses malaysia

    Default values for movement type and special stock indicator

    You can use these fields to enter default values for the movement type and the special stock indicator. The system then proposes these values for all items. If you change the default values during an entry transaction, your change does not affect the items you have already entered. The new default values apply only to items that you enter after the change.

    software development training courses malaysia

    Function Restart

    You do not have to leave the Post Goods Movement app to terminate processing. To start with a new transaction, choose Restart.

    it security training courses malaysia

    Function Check

    When you process goods movements and enter data, the system does not issue any warning messages or error messages. If you want to know whether the system will issue any warning messages or error messages before you perform the actual posting, choose Check first. A dialog box then displays all warning messages and error messages. When you check a document for the first time, you see a new Status column in the item overview that displays the check result for each item with a traffic light symbol. When you click a traffic light symbol, the message log for the corresponding item appears.

    networking training courses malaysia

    If you save the document without performing a check and error messages appear, the system displays a dialog box with a message log that includes the warning messages and error messages. If no error messages occur during posting, the system does not display any warning messages that may have occurred.

    project management training courses malaysia

    You can use a Customizing setting to force the check before posting. This setting is transaction-specific for the combination of transaction and reference.

    iot training courses malaysia

    Direct Help

    When you choose Help, a separate screen area opens with information and user tips. This means that you can display the help documentation while working in the app. To hide the help again, choose Close.

    itil training courses malaysia

    Default Values for Post Goods Movement App

    In the Post Goods Movement app, you can change the default values for movement type and special stock indicator directly on the entry screen. However, you can also select MenuSettingsDefault Values. A separate dialog window appears in which you can define these and other user-dependent default values.

    devops training courses malaysia

    Hold Data Function in Post Goods Movement App

    To hold data, choose the Hold function in the Post Goods Movement app. After this, you have the following two options for calling up held data for further processing:

    • Choose MenuGoods ReceiptHeld Data. Then select the held data that you want to continue processing and choose (Get Entry).
    • Via the overview tree: The last 10 items of held data are displayed in the overview tree. Double-click to select the held data that you want to process further.

    iot internet of things training courses malaysia

    The system deletes the held data automatically when you continue processing the goods movement.

    ibm websphere training courses malaysia

    You can also use held data as a reference template for frequently recurring transactions. The system does not delete references when you call them up again. To make a reference template from held data, select the Reference checkbox. You can recognize a reference template in the overview tree by the Favorite (Star) symbol in front of the comment.

    ibm lotus notes domino datastage training courses malaysia

    You can delete held data that you no longer require. To do this, choose MenuGoods ReceiptHeld Data, select the held data you want to delete, and choose (Delete Selected Entries).

    vmware certification training courses malaysia

    If you want to delete data that is being held by other users, use the Manage Held Data – Inventory Management app.

    visual studio net training courses malaysia

    SAP GUI Transaction for Goods Movements (MIGO)

    You can also call the function for posting goods movements using the SAP GUI. On the Easy Accessscreen, choose LogisticsMaterials ManagementInventory ManagementGoods MovementGoods Movement (transaction MIGO).

    microsoft system center certification training courses malaysia

    The functions and screen layout of the MIGO transaction are the same as those of the Post Goods Movement app. The basic navigation in the transaction also corresponds to the app navigation. However, there are small differences in the arrangement of the buttons and in the menu navigation.

    microsoft sql server certification training courses malaysia

    This is how you find the PostCancelRestartHold, and Check buttons at the top of the screen. The settings of the default values or the list of the held data can be accessed via the menu options in the menu bar above the entry screen.

    microsoft sharepoint certification training courses malaysia

    Also a transaction corresponding to the Manage Held Data – Inventory Management app is available. You start this transaction MBPM from the Easy Access menu using the following menu path: LogisticsMaterials ManagementInventory ManagementPeriodic ProcessingManage Held Data.

    sap wm warehouse management training courses malaysia

    Goods Receipt/Issue Slip for Goods Movements

    A document in printed form is often required for a physical goods movement. In inventory management, this document is known as a goods receipt/issue slip (GR or GI slip) and is used as follows:

    • A shipping paper (GR or GI slip) for the warehouse
    • An identification slip (pallet slip) for the material
    • An issue slip during a GI

    In addition to GR or GI slips, inventory management offers the option of printing material document information on labels.

    sap supply chain management scm training courses malaysia

    The system processes GR or GI slips and labels in inventory management using message technology. Depending on the type, a message can be printed or sent to a recipient (for example, by mail). Goods receipt/issue slip and labels are usually printed.

    sap s 4 hana training courses malaysia

    In standard a distinction is made between the following types of goods receipt/issue slips:

    • GR slip for external goods receipts (such as goods receipts for purchase order, or a return delivery)
    • GR slip for internal goods receipts (such as goods receipts for production order)
    • GI slip for goods issues and other goods movements

    sap fico financial accounting training courses malaysia

    In addition, there are usually three different versions for GR or GI slips. Depending on the version you choose, the system performs one of the following actions:

    • The system prints a separate slip for each item of the material document either with or without quality inspection text.
    • The system prints a single slip with all the items of the material document.

    When you enter a goods movement, you can decide whether the system should generate GR or GI slips, and if so, with which version.

    sap erp pp production planning training courses malaysia

    Units of Measure in Inventory Management

    In inventory management, a distinction is made between the following units of measure:

    • Base unit of measure or stockkeeping unit
    • Unit of entry
    • Purchase order price unit

    sap erp procurement material management training courses malaysia

    The stockkeeping unit is the unit in which the stock of a material is managed. You can enter goods movements in other units of measure, if these units of measure are defined in the material master record as alternative units of measure or as standard conversions (for example, grams into kilograms). If the unit of entry differs from the stock keeping unit, the system converts the quantity from the unit of entry into the stockkeeping unit.

    red hat openstack training courses malaysia

  • Exercise – Add a component

    In this exercise, you add a Razor component to the home page of your app.

    citrix training courses malaysia

    Add the Counter component to the Home page

    1. Open the Components/Pages/Home.razor file.
    2. Add a Counter component to the page by adding a <Counter /> element at the end of the Home.razor file.razor@page "/" <PageTitle>Home</PageTitle> <h1>Hello, world!</h1> Welcome to your new app. <Counter />
    3. Apply the change by restarting the app or using hot reload. The Counter component shows up on the home page.Screenshot of the Counter component on the Home page.

    citrix certification malaysia

    Modify a component

    Define a parameter on the Counter component to specify how much it increments with every button click.

    1. Add a public property for IncrementAmount with a [Parameter] attribute.
    2. Change the IncrementCount method to use the IncrementAmount value when incrementing the value of currentCount.The updated code in Counter.razor should look like this:razor@page "/counter" @rendermode InteractiveServer <PageTitle>Counter</PageTitle> <h1>Counter</h1> <p role="status">Current count: @currentCount</p> <button class="btn btn-primary" @onclick="IncrementCount">Click me</button> @code { private int currentCount = 0; [Parameter] public int IncrementAmount { get; set; } = 1; private void IncrementCount() { currentCount += IncrementAmount; } }
    3. In Home.razor, update the <Counter /> element to add an IncrementAmount attribute that changes the increment amount to 10, as shown by the last line in the following code:razor@page "/" <h1>Hello, world!</h1> Welcome to your new app. <Counter IncrementAmount="10" />
    4. Apply the changes to the running app.The Home component now has its own counter that increments by 10 each time the Click me button is selected, as shown in the following image.Screenshot of the Home page with the Counter update.The Counter component at /counter continues to increment by one.

    cisco certification training courses malaysia

  • Exercise – Implement CRUD operations

    Let’s continue extending our web API controller to add the ability to create (POST), update (PUT), and delete (DELETE) pizza from our inventory.

    microsoft system center certification training courses malaysia

    Add a pizza

    Let’s enable a pizza to be added through the web API by using a POST method.

    Replace the // POST action comment in Controllers/PizzaController.cs with the following code:

    microsoft sql server certification training courses malaysia

    C#

    [HttpPost]
    public IActionResult Create(Pizza pizza)
    {            
        PizzaService.Add(pizza);
        return CreatedAtAction(nameof(Get), new { id = pizza.Id }, pizza);
    }
    

    The preceding action:

    • Responds only to the HTTP POST verb, as denoted by the [HttpPost] attribute.
    • Inserts the request body’s Pizza object into the in-memory cache.

     Note

    Because the controller is annotated with the [ApiController] attribute, it’s implied that the Pizza parameter will be found in the request body.

    microsoft sharepoint certification training courses malaysia

    The first parameter in the CreatedAtAction method call represents an action name. The nameof keyword is used to avoid hard-coding the action name. CreatedAtAction uses the action name to generate a location HTTP response header with a URL to the newly created pizza, as explained in the previous unit.

    sap wm warehouse management training courses malaysia

    Modify a pizza

    Now, let’s enable a pizza to be updated through the web API by using a PUT method.

    sap supply chain management scm training courses malaysia

    Replace the // PUT action comment in Controllers/PizzaController.cs with the following code:

    C#

    [HttpPut("{id}")]
    public IActionResult Update(int id, Pizza pizza)
    {
        if (id != pizza.Id)
            return BadRequest();
               
        var existingPizza = PizzaService.Get(id);
        if(existingPizza is null)
            return NotFound();
       
        PizzaService.Update(pizza);           
       
        return NoContent();
    }
    

    The preceding action:

    • Responds only to the HTTP PUT verb, as denoted by the [HttpPut] attribute.
    • Requires that the id parameter’s value is included in the URL segment after pizza/.
    • Returns IActionResult, because the ActionResult return type isn’t known until runtime. The BadRequestNotFound, and NoContent methods return BadRequestResultNotFoundResult, and NoContentResult types, respectively.

    sap s-4 hana training courses malaysia

     Note

    Because the controller is annotated with the [ApiController] attribute, it’s implied that the Pizza parameter will be found in the request body.

    sap fico financial accounting training courses malaysia

    Remove a pizza

    Finally, let’s enable a pizza to be removed through the web API by using a DELETE method.

    sap erp pp production planning training courses malaysia

    Replace the // DELETE action comment in Controllers/PizzaController.cs with the following code:

    C#

    [HttpDelete("{id}")]
    public IActionResult Delete(int id)
    {
        var pizza = PizzaService.Get(id);
       
        if (pizza is null)
            return NotFound();
           
        PizzaService.Delete(id);
       
        return NoContent();
    }
    

    The preceding action:

    • Responds only to the HTTP DELETE verb, as denoted by the [HttpDelete] attribute.
    • Requires that the id parameter’s value is included in the URL segment after pizza/.
    • Returns IActionResult because the ActionResult return type isn’t known until runtime. The NotFound and NoContent methods return NotFoundResult and NoContentResult types, respectively.
    • Queries the in-memory cache for a pizza that matches the provided id parameter.

    Remember to save the Controllers/PizzaController.cs file before proceeding,

    sap erp procurement material management training courses malaysia

    Build and run the finished web API

    Build and start the web API by running the following command:

    .NET CLI

    dotnet run
    

    Test the finished web API with HTTP files

    1. Reopen the ContosoPizza.http file.
    2. Make a POST request to add a new pizza in HttpRepl by using the following command:OutputPOST {{ContosoPizza_HostAddress}}/pizza/ Content-Type: application/json { "name": "Hawaii", "isGlutenFree": false } ### The preceding command returns the newly created pizza:OutputHTTP/1.1 201 Created Connection: close Content-Type: application/json; charset=utf-8 Date: Wed, 17 Jan 2024 17:03:02 GMT Server: Kestrel Location: http://localhost:5192/Pizza/3 Transfer-Encoding: chunked { "id": 3, "name": "Hawaii", "isGlutenFree": false }
    3. Update the new Hawaii pizza to a Hawaiian pizza with a PUT request by using the following command:OutputPUT {{ContosoPizza_HostAddress}}/pizza/3 Content-Type: application/json { "id": 3, "name": "Hawaiian", "isGlutenFree": false } ### The preceding command returns the following output that indicates success:OutputHTTP/1.1 204 No Content Connection: close Date: Wed, 17 Jan 2024 17:07:30 GMT Server: Kestrel To verify that the pizza was updated, rerun the GET action by using the following command:OutputGET {{ContosoPizza_HostAddress}}/pizza/3 Accept: application/json ### The preceding command returns the newly updated pizza:OutputHTTP/1.1 200 OK Connection: close Content-Type: application/json; charset=utf-8 Date: Wed, 17 Jan 2024 17:09:01 GMT Server: Kestrel Transfer-Encoding: chunked { "id": 3, "name": "Hawaiian", "isGlutenFree": false }
    4. Our API can also delete the newly created pizza through the DELETE action if you run the following command:.NET CLIDELETE {{ContosoPizza_HostAddress}}/pizza/3 ### The preceding command returns a 204 No Content result for success:OutputHTTP/1.1 204 No Content Date: Fri, 02 Apr 2021 23:30:04 GMT Server: Kestrel To verify that the pizza was removed, rerun the GET action by using the following command:.NET CLIGET {{ContosoPizza_HostAddress}}/pizza/ Accept: application/json ### The preceding command returns the original pizzas as results:OutputHTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Fri, 02 Apr 2021 23:31:15 GMT Server: Kestrel Transfer-Encoding: chunked [ { "id": 1, "name": "Classic Italian", "isGlutenFree": false }, { "id": 2, "name": "Veggie", "isGlutenFree": true } ]

    You’re now finished implementing and testing a newly created web API built with ASP.NET Core.

    red hat openstack training courses malaysia

    Optional: Test the finished web API with Command Line HTTPREPL

    1. Reopen the existing httprepl terminal, or open a new integrated terminal from Visual Studio Code by selecting Terminal > New Terminal from the main menu.
    2. If you opened a new terminal, connect to the web API by running the following command:.NET CLIhttprepl https://localhost:{PORT} Alternatively, run the following command at any time while HttpRepl is running:.NET CLIconnect https://localhost:{PORT}
    3. Go to the Pizza endpoint by running the following command:.NET CLIcd Pizza
    4. Run the following command to see the new actions on the Pizza API:.NET CLIls The preceding command shows an output of available APIs for the Pizza endpoint:Output https://localhost:{PORT}/Pizza> ls . [GET|POST] .. [] {id} [GET|PUT|DELETE]
    5. Make a POST request to add a new pizza in HttpRepl by using the following command:.NET CLIpost -c "{"name":"Hawaii", "isGlutenFree":false}" The preceding command returns the newly created pizza:OutputHTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 Date: Fri, 02 Apr 2021 23:23:09 GMT Location: https://localhost:{PORT}/Pizza?id=3 Server: Kestrel Transfer-Encoding: chunked { "id": 3, "name": "Hawaii", "isGlutenFree": false }
    6. Update the new Hawaii pizza to a Hawaiian pizza with a PUT request by using the following command:.NET CLIput 3 -c "{"id": 3, "name":"Hawaiian", "isGlutenFree":false}" The preceding command returns the following output that indicates success:OutputHTTP/1.1 204 No Content Date: Fri, 02 Apr 2021 23:23:55 GMT Server: Kestrel To verify that the pizza was updated, rerun the GET action by using the following command:.NET CLIget 3 The preceding command returns the newly updated pizza:OutputHTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Fri, 02 Apr 2021 23:27:37 GMT Server: Kestrel Transfer-Encoding: chunked { "id": 3, "name": "Hawaiian", "isGlutenFree": false }
    7. Our API can also delete the newly created pizza through the DELETE action if you run the following command:.NET CLIdelete 3 The preceding command returns a 204 No Content result for success:OutputHTTP/1.1 204 No Content Date: Fri, 02 Apr 2021 23:30:04 GMT Server: Kestrel To verify that the pizza was removed, rerun the GET action by using the following command:.NET CLIget The preceding command returns the original pizzas as results:OutputHTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Fri, 02 Apr 2021 23:31:15 GMT Server: Kestrel Transfer-Encoding: chunked [ { "id": 1, "name": "Classic Italian", "isGlutenFree": false }, { "id": 2, "name": "Veggie", "isGlutenFree": true } ]

    You’re now finished implementing and testing a newly created web API built with ASP.NET Core.

    red hat linux certification malaysia

  • REST in ASP.NET Core

    When you browse to a webpage, the web server communicates with your browser by using HTML, CSS, and JavaScript. For example, If you interact with the page by submitting a sign-in form or selecting a buy button, the browser sends the information back to the web server.

    In a similar way, web servers can communicate with a broad range of clients (browsers, mobile devices, other web servers, and more) by using web services. API clients communicate with the server over HTTP, and the two exchange information by using a data format such as JSON or XML. APIs are often used in single-page applications (SPAs) that perform most of the user-interface logic in a web browser. Communication with the web server primarily happens through web APIs.

    hadoop training courses malaysia

    REST: A common pattern for building APIs with HTTP

    Representational State Transfer (REST) is an architectural style for building web services. REST requests are made over HTTP. They use the same HTTP verbs that web browsers use to retrieve webpages and send data to servers. The verbs are:

    • GET: Retrieve data from the web service.
    • POST: Create a new item of data on the web service.
    • PUT: Update an item of data on the web service.
    • PATCH: Update an item of data on the web service by describing a set of instructions about how the item should be modified. The sample application in this module doesn’t use this verb.
    • DELETE: Delete an item of data on the web service.

    Web service APIs that adhere to REST are called RESTful APIs. They’re defined through:

    • A base URI.
    • HTTP methods, such as GETPOSTPUTPATCH, or DELETE.
    • A media type for the data, such as JavaScript Object Notation (JSON) or XML.

    An API often needs to provide services for a few different but related things. For example, our pizza API might manage pizzas, customers, and orders. We use routing to map URIs (uniform resource identifiers) to logical divisions in our code, so that requests to https://localhost:5000/pizza are routed to PizzaController and requests to https://localhost:5000/order are routed to OrderController.

    exchange server certification training courses malaysia

    Benefits of creating APIs in ASP.NET Core

    With ASP.NET, you can use the same framework and patterns to build both webpages and services. You can reuse model classes and validation logic, and even serve both webpages and services side by side in the same project. This approach has benefits:

    • Simple serialization: ASP.NET was designed for modern web experiences. Endpoints automatically serialize your classes to properly formatted JSON out of the box. No special configuration is required. You can customize serialization for endpoints that have unique requirements.
    • Authentication and authorization: For security, API endpoints have built-in support for industry-standard JSON Web Tokens (JWTs). Policy-based authorization gives you the flexibility to define powerful access-control rules in code.
    • Routing alongside your code: ASP.NET lets you define routes and verbs inline with your code by using attributes. Data from the request path, query string, and request body are automatically bound to method parameters.
    • HTTPS by default: HTTPS is an important part of modern, professional web APIs. It relies on end-to-end encryption to provide privacy and to help ensure that your API calls aren’t intercepted and altered between client and server.ASP.NET provides support for HTTPS out of the box. It automatically generates a test certificate and easily imports it to enable local HTTPS, so you can run and debug your applications securely before you publish them.

    Share code and knowledge with .NET apps

    You can use your .NET skills and ecosystem to share logic from your web API to other apps built with .NET, including mobile, web, desktop, and services.

    dynamics 365 training courses malaysia

    Testing web APIs by using the .NET HTTP REPL

    When you’re developing a traditional website, you usually view and test your work in a web browser. Web APIs accept and return data rather than HTML, so a web browser isn’t the best web-API testing tool.

    One of the easiest options for exploring and interacting with web APIs is the .NET HTTP REPL (read-evaluate-print loop). It’s a simple and popular way to build interactive command-line environments. In the next unit, you create a simple web API and then interact with it by using the .NET HTTP REPL.

    dynamics 365 supply chain training courses malaysia

  • Manage security operations in Azure

    Learn how to configure security policies and manage security alerts with the tools and services in Azure. This learning path can help you prepare for the Microsoft Certified: Azure Security Engineer Associate certification.

    staff augmentation service