Note that there are some explanatory texts on larger screens.

plurals
  1. POMVC3 MvcScaffolding EF SqlCE SqlExpress - NO WORKY!
    primarykey
    data
    text
    <p>Not quite sure what's going on here but it seems as though Microsoft always comes out with the coolest frameworks (in theory) and then leaves no support. Anyone out there that can help me I will be VERY greatful. This one has had me stumped for two days now and I still cannot figure it out. Here's the setup: </p> <ol> <li>Visual Studio 2010 Professional (or Express for that matter, I've tried both)</li> <li>SQL Server Compact Edition 4 (or Express for that matter, I've tried both)</li> <li>Create New Project, add new model (I called mine BlogModels.cs)</li> <li><p>Add a new class called Post and give it properties as shown below... </p> <pre><code> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace MVC3BlogEngine.Models { public class Post { public int ID { get; set; } [Required] public string Title { get; set; } [Required] [DataType(DataType.MultilineText)] public string Text { get; set; } public DateTime PublishDate { get; set; } } } </code></pre> </li> <li><p>Run project, browse to model (/Posts) and attempt to add a new post. If I enter more than say 128 characters, an exception is thrown:</p> <blockquote> <p>Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. </p> </blockquote></li> </ol> <p>So, what gives? I go look at the database that it created (which I think is the coolest thing since sliced bagels) and see that the column that it created was a nvarchar(128). So, my first thought was that even though I told it to use MultilineText as the datatype, it didn't generate a column properly (not good MS). So, I changed the datatype to text and tried again. No luck. </p> <p>Anyone?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload