Share via

How can I do this methods in entity framework ?

Agron Sverkaj 1 Reputation point
2021-08-01T20:42:14.59+00:00

119627-metoda.txt

How can I do this methods in entity framework ? My project is entity framework

Developer technologies | .NET | Other

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,661 Reputation points
    2021-08-02T07:12:08.84+00:00

    Hi AgronSverkaj-2961,
    You can add methods to a model via Partial Classes.
    In other words, you can create another file that contains another portion of the Partial Class definition (with your additional methods).
    Code looks like:

    public partial class Employee  
        {  
            public void LoadData()  
            {   
                //  
            }  
        }  
    

    More details you can refer to this document.
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.