@@ -70,85 +70,85 @@ public async Task<bool> PhoneNumberExistsAsync(string phoneNumber)
7070 return phone is not null ;
7171 }
7272
73- public async Task < Result > UpdateAsync ( Phone phone )
73+ public async Task < UpdateStatus > UpdateAsync ( Phone phone )
7474 {
7575 Phone ? dbPhone = await dbContext . Phones . FindAsync ( phone . Imei ) ?? throw new ArgumentException ( $ "IMEI { phone . Imei } not found.") ;
76- Result result = Result . Unchanged ;
76+ UpdateStatus result = UpdateStatus . Unchanged ;
7777
7878 if ( dbPhone . AssetTag != phone . AssetTag )
7979 {
8080 dbPhone . AssetTag = phone . AssetTag ;
81- result = Result . Updated ;
81+ result = UpdateStatus . Updated ;
8282 }
8383 if ( dbPhone . Condition != phone . Condition )
8484 {
8585 dbPhone . Condition = phone . Condition ;
86- result = Result . Updated ;
86+ result = UpdateStatus . Updated ;
8787 }
8888 if ( dbPhone . DespatchDetails != phone . DespatchDetails )
8989 {
9090 dbPhone . DespatchDetails = phone . DespatchDetails ;
91- result = Result . Updated ;
91+ result = UpdateStatus . Updated ;
9292 }
9393 if ( dbPhone . Esim != phone . Esim )
9494 {
9595 dbPhone . Esim = phone . Esim ;
96- result = Result . Updated ;
96+ result = UpdateStatus . Updated ;
9797 }
9898 if ( dbPhone . FormerUser != phone . FormerUser )
9999 {
100100 dbPhone . FormerUser = phone . FormerUser ;
101- result = Result . Updated ;
101+ result = UpdateStatus . Updated ;
102102 }
103103 if ( dbPhone . IncludeOnTrackingSheet != phone . IncludeOnTrackingSheet )
104104 {
105105 dbPhone . IncludeOnTrackingSheet = phone . IncludeOnTrackingSheet ;
106- result = Result . Updated ;
106+ result = UpdateStatus . Updated ;
107107 }
108108 if ( dbPhone . Model != phone . Model )
109109 {
110110 dbPhone . Model = phone . Model ;
111- result = Result . Updated ;
111+ result = UpdateStatus . Updated ;
112112 }
113113 if ( dbPhone . NewUser != phone . NewUser )
114114 {
115115 dbPhone . NewUser = phone . NewUser ;
116- result = Result . Updated ;
116+ result = UpdateStatus . Updated ;
117117 }
118118 if ( dbPhone . Notes != phone . Notes )
119119 {
120120 dbPhone . Notes = phone . Notes ;
121- result = Result . Updated ;
121+ result = UpdateStatus . Updated ;
122122 }
123123 if ( dbPhone . OEM != phone . OEM )
124124 {
125125 dbPhone . OEM = phone . OEM ;
126- result = Result . Updated ;
126+ result = UpdateStatus . Updated ;
127127 }
128128 if ( dbPhone . PhoneNumber != phone . PhoneNumber )
129129 {
130130 dbPhone . PhoneNumber = phone . PhoneNumber ;
131- result = Result . Updated ;
131+ result = UpdateStatus . Updated ;
132132 }
133133 if ( dbPhone . SerialNumber != phone . SerialNumber )
134134 {
135135 dbPhone . SerialNumber = phone . SerialNumber ;
136- result = Result . Updated ;
136+ result = UpdateStatus . Updated ;
137137 }
138138 if ( dbPhone . SimNumber != phone . SimNumber )
139139 {
140140 dbPhone . SimNumber = phone . SimNumber ;
141- result = Result . Updated ;
141+ result = UpdateStatus . Updated ;
142142 }
143143 if ( dbPhone . Status != phone . Status )
144144 {
145145 dbPhone . Status = phone . Status ;
146- result = Result . Updated ;
146+ result = UpdateStatus . Updated ;
147147 }
148148 if ( dbPhone . Ticket != phone . Ticket )
149149 {
150150 dbPhone . Ticket = phone . Ticket ;
151- result = Result . Updated ;
151+ result = UpdateStatus . Updated ;
152152 }
153153
154154 dbContext . Phones . Update ( dbPhone ) ;
0 commit comments