Fabric.js – how to save canvas on server with custom attributes

Good question. If you’re adding custom properties to objects, those objects are likely “special” in some way. It seems like subclassing them would be a reasonable solution. For example, here’s how we would subclass a fabric.Image into a named image. Those image objects could then have names like “Gandalf” or “Samwise”. fabric.NamedImage = fabric.util.createClass(fabric.Image, { … Read more

When should I call SaveChanges() when creating 1000’s of Entity Framework objects? (like during an import)

I would test it first to be sure. Performance doesn’t have to be that bad. If you need to enter all rows in one transaction, call it after all of AddToClassName class. If rows can be entered independently, save changes after every row. Database consistence is important. Second option I don’t like. It would be … Read more