Request Help

Nov 9, 2012 at 5:38 PM

Using Visual Studio 2012

 

Getting the following warning

Warning 1 Field 'Parichay.Data.Entity.MemberGroups._FKGrpMsgGrp' is never assigned to, and will always have its default value null C:\ADBMS\v3\Parichay.Data\Entity\Entity\MemberGroups.cs 22 53 Parichay.Data

Warning 2 Field 'Parichay.Data.Entity.MemberGroups._FKGrpMmbrsGrp' is never assigned to, and will always have its default value null C:\ADBMS\v3\Parichay.Data\Entity\Entity\MemberGroups.cs 23 52 Parichay.Data

 

Thanks in advance

Coordinator
Mar 1, 2013 at 3:23 AM
Hello,

I'm very sorry for delay in response. I hope you've already got it resolved. In above case NHibernate is setting the values. To resolve this we can either take a look at this:-

http://stackoverflow.com/questions/526443/globally-suppress-c-sharp-compiler-warnings

Or we can simply assign them in MemberGroups class-
    private  IList<MemberGroupmessages> _FKGrpMsgGrp = new List<MemberGroupmessages>();
    private  IList<MemberGroupmembers> _FKGrpMmbrsGrp = new List<MemberGroupmembers>();
Please do let me know if this is what worked for you.

Best Regards.