Auto-Generate ViewModel Class

Feb 27 2013 10:51 AM
Hello , 
In my current project, we are using Silverlight 4, RIA services, Linq-to-SQL,MVVMlight from GalaSoft. I aware of creating .dbml file , domainservices.cs and doaminservice.metadata.cs files.But I am not aware of creating a viewmodel.cs file automatically.


This project is halfway done, all the viewmodel.cs files are auto generated. I dont know how to generate the viewmodel files automatically. I am trying to write the code manually, bu the problem is after rebuilding the code I have written is gone, or it is not taking any datacontext.

I am new to RIA services .Can anyone please help me out with this. Thank you very much.

using .VSO.ViewModels;

//------------------------------------------------------------------------------
// <copyright file="PlannerViewModel.cs" company=" Corporation">
//     Copyright (c) Corporation. All rights reserved.
// </copyright>
// <auto-generated>
//     Template Version : 1.0.0.0
//     ViewModel for Planner 
//   Generated from C:\DEV2010\VSO\Source\VSO\VSO.Web\Models\Planner.dbml
// </auto-generated>
//------------------------------------------------------------------------------

namespace .VSO.ViewModel


Or is there any other tool to generate the code.