Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8444425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:23:46+00:00 2026-06-10T09:23:46+00:00

I have created Enum class of LeaveReason in data access layer having values sick

  • 0

I have created Enum class of LeaveReason in data access layer having values sick leave,planned leave or other reason now i want to call this enum class to my custom type layer but how to call it ???
please help as i am new in c#…

here is my code looks like…..

In Data Access layer :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sherserve.DataAccessLayer
{

    public enum LeaveReason
    {
        Sick,
        Planned,
        Other

    }

}

In Data Custom Type layer :

Now i want to access enum class which i created in data access layer in custom type layer.
You can see i have added reference of data access layer but it is showing error..

please correct this and tell me how i can call enum class in custom type layer.

using System;
using System.Collections.Generic;

using System.Text;
using Sherserve.DataAccessLayer;

namespace Sherserve.CustomTypeLayer
{
    public class EmployeeLeave
    {
        public LeaveReason LeaveType { get; set; }
        public int EmployeeId { get; set; }
        public DateTime DateFrom { get; set; }
        public DateTime DateTo { get; set; }
        public string Reason { get; set; }
    }
}

my problem is that i am un able to call enum class from data access to custom type and also i am unable to add reference of data access class to custom type…
please guide me properly..

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:23:47+00:00Added an answer on June 10, 2026 at 9:23 am

    You need to add a reference to the Sherserve.DataAccessLayer in the Sherserve.CustomTypeLayer. Typically the Sherserve.CustomTypeLayer would be a class library project that its output is a .dll file that you add to the other dataaccess layer from references -> add reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created Enum of Leave Reason and now i want to convert it
I have a class that is created from an enum that can be tested
I have created a web service containing an enum with values as follows public
I have a problem here. I created SpecialCharacterField.java - an enum class that will
I have created an enum as so: enum Types { hi, hello, bye }
I have a web service in which I created an enum.. i have a
I have created a axis2 webservice including a method with multiple parameters: class Service
I have a custom class Error and some pre-created errors (let's call them A,
So I have a class (myClass) that I've created in my C# application. When
I have created a class which extends JDialog, where I have some checkboxes and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.