This question is locked. New answers and comments are not allowed.
Hello,
I have an MVC application and a user has the option to update a data model that is pulled from the database. Is it possible to update the model in the database (SQL Management Server 2008) using Telerik OpenAccess ORM without having to set each individual property in the model? Right now I update the db by a method that looks like this:
public ActionResult Edit(QuoteViewModel _quote)
{
using(var dbcontext = new EntitiesModel())
{
var _existingQuote = dbContext.Quotes.Where(s => s.QuoteNum == _quote.QuoteNum).FirstOrDefault();
_existingQuote.CustomerName = "Mike";
_existingQuote.PhoneNumber = "8675309";
_existingQuote.Address = "5555 Nakatomi Plaza";
//more properties would follow?
dbcontext.SaveChanges();
}
}
Thanks,
Shaun
I have an MVC application and a user has the option to update a data model that is pulled from the database. Is it possible to update the model in the database (SQL Management Server 2008) using Telerik OpenAccess ORM without having to set each individual property in the model? Right now I update the db by a method that looks like this:
public ActionResult Edit(QuoteViewModel _quote)
{
using(var dbcontext = new EntitiesModel())
{
var _existingQuote = dbContext.Quotes.Where(s => s.QuoteNum == _quote.QuoteNum).FirstOrDefault();
_existingQuote.CustomerName = "Mike";
_existingQuote.PhoneNumber = "8675309";
_existingQuote.Address = "5555 Nakatomi Plaza";
//more properties would follow?
dbcontext.SaveChanges();
}
}
Thanks,
Shaun