public ActionResult Create(aspnet_MPRoles model)
 {
     ViewData["Message"] = "Success!";
     MoneyPacificRoleProvider provider = new MoneyPacificRoleProvider();
     provider.CreateRole(model.RoleName);
     return View();
 }
        public override void CreateRole(string roleName)
        {
            // throw new NotImplementedException();
            ASPNETDBEntities1 db = new ASPNETDBEntities1();

            //aspnet_MPRoles newRole = db.aspnet_MPRoles.CreateObject();

            aspnet_MPRoles newRole = new aspnet_MPRoles();
            newRole.RoleName = roleName;
            newRole.LowerRoleNam = roleName.ToLower();

            db.aspnet_MPRoles.AddObject(newRole);
            //db.SaveChanges();
            db.Connection.Close();            
        }
        public ActionResult Create()
        {
            ASPNETDBEntities1 db = new ASPNETDBEntities1();

            string roleName = "LeThanhDung";
            //aspnet_MPRoles newRole = db.aspnet_MPRoles.CreateObject();

            aspnet_MPRoles newRole = new aspnet_MPRoles();
            newRole.RoleName = roleName;
            newRole.LowerRoleNam = roleName.ToLower();

            db.aspnet_MPRoles.AddObject(newRole);

            db.SaveChanges();
            db.Connection.Close(); 
            return View();
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the aspnet_MPRoles EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToaspnet_MPRoles(aspnet_MPRoles aspnet_MPRoles)
 {
     base.AddObject("aspnet_MPRoles", aspnet_MPRoles);
 }
 /// <summary>
 /// Create a new aspnet_MPRoles object.
 /// </summary>
 /// <param name="roleId">Initial value of the RoleId property.</param>
 public static aspnet_MPRoles Createaspnet_MPRoles(global::System.Int32 roleId)
 {
     aspnet_MPRoles aspnet_MPRoles = new aspnet_MPRoles();
     aspnet_MPRoles.RoleId = roleId;
     return aspnet_MPRoles;
 }