Hi all,
i created wcf services in this service method i called class as a perameter.
here iam getting error "
Inconsistent accessibility: parameter type '' is less accessible than method"
the code is like below
namespace demo.TransferObjects
{
public class Severity
{
public string LayerName { get; set; }
public float AttValue { get; set; }
public float LimitValue { get; set; }
public float ExpCost { get; set; }
public float AttachProb { get; set; }
public float LossProb { get; set; }
public float ShareLayer { get; set; }
public float Premium { get; set; }
}
}
the service declaration i called the severity class as a perameter
[ServiceContract]
public interface IDemoService
{
[OperationContract]
[WebInvoke(
Method = "POST",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
UriTemplate = "/SeverityAnalysis")]
SeverityResponse SeverityAnalysis(Severity input);
}
the implementation method also i am getting same issue.
the implemenation method like below
public class DemoService : IDemoService
{
public SeverityResponse SeverityAnalysis(Severity input)
{
return ServiceHelper.InvokeList<SeverityResponse, Severity>(() =>
{
// Calculate severity based on input values
return new Severity();
});
}
}
}
please share any information to me.