public Lender CreateLender(string Name)
        {
            Lender lender = new Lender();

            lender.Name = Name;

            return lender;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Lenders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLenders(Lender lender)
 {
     base.AddObject("Lenders", lender);
 }
        public Lender SaveLender(Lender Lender)
        {
            ((DatabaseContext)this.Database).Lenders.AddObject(Lender);

            ((DatabaseContext)this.Database).SaveChanges();

            ((DatabaseContext)this.Database).Refresh(System.Data.Objects.RefreshMode.StoreWins, Lender);

            return Lender;
        }
 /// <summary>
 /// Create a new Lender object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="addressId">Initial value of the AddressId property.</param>
 public static Lender CreateLender(global::System.Int32 id, global::System.String name, global::System.Int32 addressId)
 {
     Lender lender = new Lender();
     lender.Id = id;
     lender.Name = name;
     lender.AddressId = addressId;
     return lender;
 }