I have the codes has no error on compiling but get error when execute it.
public class DepartmentController : ApiController
private DeptEntities db = new DeptEntities();
List<string> departments = new List<string>();
public IEnumerable<string> GetDept()
using (DeptEntities context = new DeptEntities())
var result = (from Department in db.Department orderby Department.ID
DepartmentName = Department.Name
if (result == null)
throw new HttpResponseException(HttpStatusCode.NotFound);
Unable to cast the type 'Anonymous type' to type 'System.String'.
LINQ to Entities only supports casting EDM primitive or enumeration types.
More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.
While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.
If your ASP.NET page …
New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each
page automatically generates a Mailchimp signup form in the sidebar.
This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message.
In the To field, type your recipient's fax number @efaxsend.com.
You can even send a secure international fax — just include t…