public String InsertCategory(String name) { Category category = new Category(); category.Name = name; category.CreatedDate = DateTime.Now; try { context.Categories.InsertOnSubmit(category); context.SubmitChanges(); return null; } catch (Exception ex) { return ex.ToString(); } }
partial void UpdateCategory(Category instance);
partial void DeleteCategory(Category instance);
partial void InsertCategory(Category instance);