LINQ and Lightspeed, some oddities...(hockblogs.net)

submitted by hockmanhockman(505) 3 years ago

Hi there, I'm currently developing an ASP.NET (actually rewriting a PHP website) website, and since my provider doensn't support SQL Express, I had to use MySQL (could have used SQLLite ofcourse, but I went with MySQL). I found this really cool ORM tool, called Lightspeed. Since I don't have have that many tables in my simple website, I can use the free edition. So following the tutorial, I create a new LightspeedContext. LightSpeedContext<ModelUnitOfWork> db = new LightSpeedContext<ModelUnitOfWork>(); List<Picture> pictures = new List<Picture>(); using (var unitOfWork = db.CreateUnitOfWork()) { var pics= unitOfWork.Pictures.Select(p => new Picture() {Name = string.Format("/book/photo/{0}.jpg", p.Name), Description= p.Description ?? string.Empty}); } pictures.AddRange(pics);

add a comment |category: |Views: 24

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story