#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    37
    Rep Power
    3

    Need help converting from C#


    I do C# 40 hrs a week, and I can't get the syntax for this in VB to save my life, lol. This will likely be the first of MANY questions like this...

    Code:
    public abstract class BaseRepository<T> where T : Entity
        {
            public virtual RepositoryResponse Create(T entity)
            {
                try
                {
                    using (var db = new Context.Context())
                    {
                        db.Set<T>().Add(entity);
                        db.SaveChanges();
                    }
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,443
    Rep Power
    4539
    I don't do C#. Maybe if you posted the VB converted code you've tried and what problems you've had with the VB code you'll get a better answer here.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo