4
Answers

sql Invalid column in core web api

hello,

I am using asp.net core web api  and entity framework core.

I have two tables LogsMaster with columns Id, title, Description and PermissionMaster with columns Id, LogId and ContactId

When Log details is saved in LogsMaster, along with it I am saving LogId(Primary Id column of LogsMaster) and ContactId in PermissionMaster table. So one LogId can have multiple ContactId in PermissionMaster table.

Using following property in LogsMaster table to save ContactId List
public IEnumerable<ContactsMaster> Contacts { get; set; }

In GET request of Contact api, I am getting 500 error code and error is  : 

Exception: Invalid column name 'LogsMasterId' 

I don't have 'LogsMasterId' column in my project or in database, so I am not sure from where that colmumn is coming from ?

Maybe because of One-to-many table relation, I am  not using Primary-foreign key relationship to any table

plz help me with this ?

thank you

Answers (4)
0
Bahar Jalali

Bahar Jalali

NA 185 307.7k 13y
hi thanks

but i saw this topic before you write but i have a problem with get video !

i test my analog camera and dvr by a demo of directx

that it lists all capture devices connected to the computer, and another way to test : vlc media player! it shows connected cameras but i cant see name of my camera in none of them!


i find my dvr name in the device manager (sounds and video) list
but i don't know why i cant see my analog camera's name in the list of that demo
demo don't have any problem, because i tested it by my webcam and it work fine but it can't find my analog camera.

and i think i must test my camera in the internet like skype! but i don't know how i can test my camera by skype or etc.
i see video in the dvr software, but i can't connect to the camera by codes!

any suggestion?!

thanks
0
Hemant Kumar

Hemant Kumar

NA 2.3k 494.3k 13y
There is no direct way in C# or .NET to do so, however with some external
libraries you can. One well known and powerful method is DirectShow.NET
(http://www.codeproject.com/cs/media/directshownet.asp) which is a wrapper
around many DirectShow and unmanaged calls to DirectX.

Another easy method, is DirectX.Capture
(http://www.codeproject.com/cs/media/directxcapture.asp) which is a library
that wrapps itself around the previously mentioned DirectShow.NET and makes
capture very very easy.
http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/7fefc9c4-37e8-4bbb-b2c2-1f396ff7f862