public ObjectResponse <bool> Create(CantonVM cantonVM)
        {
            var canton   = Mapper.MapFromVM(cantonVM);
            var response = Repository.Create(canton);

            return(response);
        }
Exemplo n.º 2
0
        public static CantonVM MapToVM(Canton canton)
        {
            CantonVM cantonVM = new CantonVM()
            {
                CantonId = canton.CantonId,
                Name     = canton.Name
            };

            return(cantonVM);
        }
Exemplo n.º 3
0
        public static Canton MapFromVM(CantonVM cantonVM)
        {
            Canton canton = new Canton()
            {
                CantonId = cantonVM.CantonId,
                Name     = cantonVM.Name
            };

            return(canton);
        }
        public ObjectResponse <bool> Update(CantonVM cantonVM)
        {
            var canton = Mapper.MapFromVM(cantonVM);

            return(Repository.Update(canton));
        }
 public ObjectResponse <bool> Update(CantonVM canton)
 {
     return(_canton.Update(canton));
 }
 public ObjectResponse <bool> Create(CantonVM canton)
 {
     return(_canton.Create(canton));
 }