TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shilpa Katre
NA
54
28.9k
Insert Data Using RIA Service
Jul 22 2011 1:11 AM
I am enable to insert the data using RIA service,Please tell..How to use RIA service for insert the data in table from client side using silverlight 4?
/*This is my Domain Service code*/
public void insertData(CarBind data)
{
if (data.EntityState != EntityState.Added)
{
if ((data.EntityState != EntityState.Detached))
{
this.ObjectContext.ObjectStateManager.ChangeObjectState(data, EntityState.Added);
}
else
{
this.ObjectContext.AddToCarBinds(data);
}
}
}
/*This is my client side code */
private void Add_Click(object sender, RoutedEventArgs e)
{
var context = new DomainService1();
CarBind car = new CarBind();
car.Car_No =Convert.ToInt32(textbxCarNo.Text);
car.Car_Name = textbxCarName.Text;
car.Car_Price = Convert.ToInt32(textbxCarPrice.Text);
context.CarBinds.Add(car);
}
Reply
Answers (
2
)
How to maintain session in wcf for silverlight apps?
'ConstrainExtentBehavior' cannot be added to a collection or dictionary of type 'BehaviorCollection'