private object BuildReferenceDto(Territory item)
 {
     return new{
         StringId = _stringConverter.ToString(item),
         Description = item.ToString(),
     };
 }
Exemple #2
0
 public virtual bool Equals(Territory other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     if (TerritoryId != default(string))
     {
         return other.TerritoryId == TerritoryId;
     }
     return other.TerritoryId == TerritoryId && other.TerritoryDescription == TerritoryDescription && 1 == 1 && other.Region == Region;
 }
        private object BuildFullDto(Territory item)
        {
            return new{
                StringId = _stringConverter.ToString(item),
                item.TerritoryId,
                item.TerritoryDescription,
                // item.Employees, // Skip bacause is collection of non detail objects

                item.Region,
            };
        }
 public void Update(Territory v)
 {
     _Northwind.Update(v);
 }
 public void Delete(Territory v)
 {
     _Northwind.Delete(v);
 }
 public void Create(Territory v)
 {
     _Northwind.Save(v);
 }
 public void Update(Territory v)
 {
     _northwind.GetCurrentSession().Update(v);
 }
 public void Delete(Territory v)
 {
     _northwind.GetCurrentSession().Delete(v);
 }
 public void Create(Territory v)
 {
     _northwind.GetCurrentSession().Save(v);
 }
 public string ToString(Territory obj)
 {
     return obj.TerritoryId;
 }