Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert Using ruby's activerecord in C...

Replytotopic

Using ruby's activerecord in C#/.NET

Posted in Forums : Ask a Rails expert

 
Author_photo2007129330555555

Authority 0
Posting Rating 86
Sign in to rate this post

The one thing that I really liked about ruby is activerecord. Is there a way for me to use it in my c# projects so that I can only have a one business layer to use(which is activerecord) on my web apps and desktop apps?

 
0256f4863b3a08d20a382766f842e63c?s=120

Authority 75
Posting Rating 0
Sign in to rate this post

Hey Reymon,

There is an MVC framework for ASP.NET called… ASP.NET MVC created by Scott Guthrie and his team, you should give it a try because for more and more companies, it’s the standard framework (replacing the old codebehind way of designing your app).

 
Profile

Authority 0
Posting Rating 0
Sign in to rate this post

The other answer didn’t really cover the same thing – ASP.NET MVC offers an MVC framework that’s miles better than the previous ASP.NET framework (IMHO), but it doesn’t cover ActiveRecord – a lot of the documentation you’ll find talks about using a DBML file and LINQ for data access.
For actually getting ActiveRecord implementations within .NET, there’s the Castle MonoRail project, which includes Castle ActiveRecord. Alternatively there’s the SubSonic project, which also has an ActiveRecord implementation. Both work. Both have the standard limitations (don’t try using an object model to add a million records, use the native database bulk import routines, etc). SubSonic probably has more traction of late, although the Castle ActiveRecord comes as part of its own MVC implementation which is also worth a look.

Neither are quite the same as Ruby’s way of doing things, because you’re defining an object model and letting the system update the database structure, rather than defining migrations, so it doesn’t necessarily simplify migration from one revision to another as much as you might expect coming from using ActiveRecord in a Ruby environment, but on the plus side you’re defining classes in C#/VB.NET, not using a Domain-Specific Language.

 
Profile

Authority 62
Posting Rating 0
Sign in to rate this post

I use activerecord’s migrator in .NET projects, and nhibernate w/fluent nhibernate for data access.

 
Profile

Authority 12
Posting Rating 0
Sign in to rate this post

A few years ago I’ve been presented to this project: http://castleproject.org/castle/projects.html
It tries to give same kind of tools in C#, it was before ASP.NET MVC but I think is still relevant!
Good Luck!

 
Author_photo2007129330555555

Authority 0
Posting Rating 86
Sign in to rate this post

What I really mean is I want to use ruby activerecord library in my c# apps. Is it possible? I’ve heard of ironruby, will I be able to use it?

 
Www

Authority 87
Posting Rating 2
Sign in to rate this post

ya it possible u can use it , me ruby on rails developer.
http://www.railsteam.com

Replytotopic

Other Recent Topics

Ask a Rails expert : nested application ApplicationController get called intead of children::ApplicationController

Ask a Rails expert : Best way to structure a database for a large/static dataset

Ask a Rails expert : Ruby Developer (ROR) - Scottish based (Remote working from within the UK)

Ask a Rails expert : Above Ground Pool Supplies

Ask a Rails expert : How to get url params in observer or model in Rails 3.1

Ask a Rails expert : What can persuade you to hire Junior Ruby devs with significant PHP experience?

Ask a Rails expert : What industry value does the Ruby or Rails Certification currently have?

Ask a Rails expert : Louis Vuitton Damier Azur Canvas specially sale ( www.salecheaplouisvuitton.com )

Ask a Rails expert : ·How to check errors/puts statements from ruby files which are under cronob

Ask a Rails expert : Louis Vuitton cheap Soft Sided Luggagespecial offer( www.salecheaplouisvuitton.com )

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel