Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpPost]
- public ActionResult Register(User model)
- {
- DateTime bla = new DateTime(2012, 12, 12);
- try
- {
- User user = new User
- {
- gid = 1,
- cid = 1,
- firstName = model.firstName,
- lastName = model.lastName,
- email = model.email,
- username = model.username,
- password = model.password,
- creationDate = bla,
- active = 1
- };
- myContext.Users.AddObject(user);
- myContext.SaveChanges();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- return View();
- }
- [id] [int] IDENTITY(1,1) NOT NULL,
- [cid] [int] NULL,
- [gid] [int] NULL,
- [firstName] [nvarchar](100) NOT NULL,
- [lastName] [nvarchar](100) NOT NULL,
- [email] [nvarchar](max) NOT NULL,
- [username] [nvarchar](100) NOT NULL,
- [password] [nvarchar](100) NOT NULL,
- [creationDate] [datetime] NOT NULL,
- [active] [int] NOT NULL,
- {"An error occurred while updating the entries. See the inner exception for details."}
- {"The member with identity '' does not exist in the metadata collection.rnParameter name: identity"}
- select 'trigger called, i am here'
- select column
- select @variable=column
- select newid()
- [HttpPost]
- public ActionResult Register(User model)
- {
- DateTime bla = new DateTime(2012, 12, 12);
- try
- {
- model.gid = 1;
- model.cid = 1;
- model.creationDate = bla;
- model.active = 1;
- myContext.Users.AddObject(model);
- myContext.SaveChanges();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex);
- throw;
- }
- return View();
- }
- foreach (var comp in colorstyle.Companions)
- comp.LinkCS = db.ColorStyles.Find(comp.LinkColorStyleId);
Add Comment
Please, Sign In to add comment