小编Ren*_*n44的帖子

Specified cast is not valid C# Entity Framework

Hi I have been getting this Specified cast is not valid in my code but when I connect to my backup database I do not get the Specified cast is not valid error. I am not sure what is going on.

Again, this code works perfectly on one database and gives me the error on the other.

My Controller

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data.Linq.SqlClient;
using System.Text.RegularExpressions;
using MvcPaging;
using lookups.Models;
using lookups.Helpers;


namespace …
Run Code Online (Sandbox Code Playgroud)

c# sql asp.net-mvc entity-framework casting

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

casting ×1

entity-framework ×1

sql ×1