Search Posts

Category: linq

Wcf Rest Service Method Returns Errors Unable to Cast Object Of Type

I am consuming Wcf Rest Service into Angular JS Web Application. I am posting multi request from angular js application to wcf . When i post the request to wcf service i got following errors in console application . The server encountered an error processing the request. The exception message is ‘Unable to cast object of type ‘System.Data.Entity.Infrastructure.DbQuery`1[System.String]’ to type ‘System.IConvertible’.’. See server logs for more details. The exception stack trace is: Here is the […]

Angualr JS Application Failed to Return Expected Error Message

I am consuming wcf rest service into angular js application .First I am checking username in database . If the username name is exist then i want to display message in angular js web application is username name is exist please choose other username .If username is not exist then i want to insert the record into database and its working fine. But problem is when i click the submit button its always display message […]

Angular Application Data Binding is Not Working

I am consuming wcf rest service into angular js application . I am trying to get account information based on account number . but the problem is its displaying text Account_Type three times then showing the values . Here is the method code . public string AccountDetails(string Account_Number) { var accountNumber = int.Parse(Account_Number);//It could be better to use TryParse using (HalifaxDatabaseEntities context = new HalifaxDatabaseEntities()) { var inOut = context.Current_Account_Deposit.Where(x => x.Account_Number == accountNumber).Select(w => […]

The Linq Query Returns Errors

I am consuming wcf rest service into angular js application . I am joining three tables records into a single record and displaying it in web application . I want when i click the button with account number it should returns user account information like account number , Money In ,Money Out ,Date and Account Balance etc . But i got following errors in google chrome network tab .. The server encountered an error processing […]

Linq Query Return Duplicate Record From Sql Database

I am trying to join three linq queries into single query and display the records into an angular js application. But the problem is when I enter the account number and click the submit button, it also displays the duplicate record. Here is the Linq Query: public string TranscationDetails(string Account_Number) { var accountNumber = int.Parse(Account_Number);//It could be better to use TryParse using (HalifaxDatabaseEntities context = new HalifaxDatabaseEntities()) { var CombinedQuery = (from x in context.Current_Account_Deposit […]

Linq Query Unable to return Expected Result in Wcf service with Angular JS Application

I am consuming wcf rest service into Angular JS Application .I have two table named Current_Account_Deposit and Current_Account_Withdraw.I am joining two tables records into single record and displaying the records in angular js application.This is account holder transaction record like Money deposit and withdraw. When I have record for both table ,its able to retrieve but if i have only Current_Account_Withdraw record in database ,its do not display anything. Here is the Interface. [OperationContract] [WebInvoke(Method […]

Rest Wcf Service Method not Allowed 405 (Method Not Allowed)

I am consuming Wcf Service in Angular Js Application .I created my wcf service into class library project and I hosted it into Console Application .My service will be access able in localhost:8080 in this base address. I also added a class called Gobal.cs to accept Get, Put , Post etc. operation .I am also useig a local class to encrypt the user password .I trying to creating user registration system by postring username and […]