Click here to Skip to main content
15,908,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I Define a new Datatype (persiandate) in my sqlserver,
and create a new table but when i use LINQ in c# 2008,
and darg table following error message appear:

one or more selected items contain a datatype that
is not supported by the designer.

How to define this new datatype for LINQ?
Posted
Comments
Sergey Alexandrovich Kryukov 22-May-12 1:50am    
How about using a string type? You need to override ToString and define Parse, TryParse for your type.
--SA

1 solution

Hello

As it says the data type is not supported and no way to force it to EF.

MSDN

I prefer to use PersianDate as nvarchar in Database and Converting them to PersianDate in my C# application. (Look at SA's suggestion, he's right)

If you have any problem in converting persian date string maybe it helps: PersianDate Library that Returns value and Converts System.DateTime[^]
 
Share this answer
 
Comments
Prasad_Kulkarni 22-May-12 7:25am    
Good one +5!
Shahin Khorshidnia 22-May-12 7:50am    
Thank you Prasad :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900