• Employees.IDataServices
  • Ctrl+Shift+B
  • New Project.
  • Add Project
  • Add IEmployeeDataServices class




    Download 2.23 Mb.
    bet3/16
    Sana20.03.2020
    Hajmi2.23 Mb.
    #8262
    1   2   3   4   5   6   7   8   9   ...   16

    Add IEmployeeDataServices class


    As this is the interface, I will name this as IEmployeeDataServices.

    Next, add IEmployeeDataServices interface class. Right-click the Employees.IDataServices Project folder and select Add > New Item.

    In the Add New Item dialog, select the Class template. Name the class IEmployeeDataServices and click OK.

    dataservices is an object that encapsulates the data layer, and contains logic for retrieving data and mapping it to an entity model. Even though the example app doesn’t use a database, it’s useful to see how you can inject a repository into your controllers.



    Replace the generated code with the below:



    Build this project by clicking Ctrl+Shift+B in order to create dll as this project will be used as a reference for the other projects and make sure there is no build error.

    Create a DataServices Project,

    In Solution Explorer, right click the src folder and select Add > New Project.



    In the Add Project dialog, select the Class Library template. Name the project Employees.DataSerivces and click OK.



    Katalog: Blog -> wp-content -> uploads -> 2016

    Download 2.23 Mb.
    1   2   3   4   5   6   7   8   9   ...   16




    Download 2.23 Mb.