Example #1
0
 public static string ToSimpleString(this Shippers obj)
 {
     return(string.Format("{{ShipperID:{0}, CompanyName:{1}, Phone:{2}}}",
                          obj.ShipperID,
                          obj.CompanyName,
                          obj.Phone));
 }
Example #2
0
 public static IDictionary <string, object> ToDictionary(this Shippers item)
 {
     return(new Dictionary <string, object>()
     {
         [_SHIPPERID] = item.ShipperID,
         [_COMPANYNAME] = item.CompanyName,
         [_PHONE] = item.Phone
     });
 }
Example #3
0
 public static void UpdateRow(this Shippers item, DataRow row)
 {
     row.SetField(_SHIPPERID, item.ShipperID);
     row.SetField(_COMPANYNAME, item.CompanyName);
     row.SetField(_PHONE, item.Phone);
 }
Example #4
0
 public static void FillObject(this Shippers item, DataRow row)
 {
     item.ShipperID   = row.GetField <int>(_SHIPPERID);
     item.CompanyName = row.GetField <string>(_COMPANYNAME);
     item.Phone       = row.GetField <string>(_PHONE);
 }
Example #5
0
 public static ShippersAssociation GetAssociation(this Shippers entity)
 {
     return(entity.AsEnumerable().GetAssociation().FirstOrDefault());
 }
Example #6
0
 public static void CopyTo(this Shippers from, Shippers to)
 {
     to.ShipperID   = from.ShipperID;
     to.CompanyName = from.CompanyName;
     to.Phone       = from.Phone;
 }
Example #7
0
 public static bool CompareTo(this Shippers a, Shippers b)
 {
     return(a.ShipperID == b.ShipperID &&
            a.CompanyName == b.CompanyName &&
            a.Phone == b.Phone);
 }