public int InsertForm(FormModel form) { FormDAL formDAL = new FormDAL(); var reqCookies = cookieControl(); var newForm = new Form() { Name = form.Name, Description = form.Description, CreatedAt = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss"), CreatedBy = Convert.ToInt32(reqCookies["Id"]) }; formDAL.Insert(newForm); return(newForm.Id); }