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 8604163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:30:14+00:00 2026-06-12T02:30:14+00:00

I have a simple business manager facade that should just persist some inventory information.

  • 0

I have a simple business manager facade that should just persist some inventory information. However I keep getting the error that “Home.Services.InventorySvc” is a type being used as a variable.

My facade code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Home.Domain;
using Home.Services;

namespace Home.Business
{
    public class InventoryMngr
    {
        public void Create(CreateInventory inv) 
        {
            Factory factory = Factory.GetInstance();
            InventorySvc invSvc =
            (InventorySvc)factory.GetService(
            (InventorySvc).Name);
            invSvc.CreateInventory(inv);
        }
    }
} 

The InventorySvc code

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

namespace Home.Services
{
    public interface InventorySvc : IService
    {
        void CreateInventory(CreateInventory createinventory);
    }
}
  • 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-12T02:30:16+00:00Added an answer on June 12, 2026 at 2:30 am

    You are using (InventorySvc).Name which is the same as InventorySvc.Name, so that would be accessing a static member of the InventorySvc class. As it’s not a class but an interface, it can’t have static members.

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

Sidebar

Related Questions

I have simple win service, that executes few tasks periodically. How should I pass
I have simple php validation form that is halfway working. If you leave the
I always have the the trouble in determining whether I should put business logic
I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that
I wonder if this is something very simple that I'm just missing, or if
We currently have a quite complex business application that contains a huge lot of
I have a simple authentication provider that I'm trying to use with Spring Security.
I've just begun diving into data warehousing and I have one question that I
Let us say we have a simple business object: class SimpleBO { public string
I have been asked to build a rather simple form processor application that interacts

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.